Subject: pkg/33692: textproc/aspell fails to build using gcc4
To: None <pkg-manager@netbsd.org, gnats-admin@netbsd.org,>
From: None <martijnb@atlas.ipv6.stack.nl>
List: pkgsrc-bugs
Date: 06/10/2006 20:15:00
>Number:         33692
>Category:       pkg
>Synopsis:       textproc/aspell fails to build using gcc4
>Confidential:   no
>Severity:       serious
>Priority:       high
>Responsible:    pkg-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sat Jun 10 20:15:00 +0000 2006
>Originator:     martijnb@atlas.ipv6.stack.nl
>Release:        NetBSD 3.99.21
>Organization:
	
>Environment:
	
	
System: NetBSD atlas.ipv6.stack.nl 3.99.21 NetBSD 3.99.21 (ATLAS) #0: Sat Jun 10 12:31:01 CEST 2006 martijnb@atlas.ipv6.stack.nl:/usr/obj/sys/arch/amd64/compile/ATLAS amd64
Architecture: x86_64
Machine: amd64
>Description:
	textproc/aspell fails to build using gcc4, due to a (to my best 
	knowledge) illegal declaration of a member function of a class. 
	
class NroffFilter
{
private:
    [...]
    bool NroffFilter::process_char (FilterChar::Chr c);
    [...]
};

This works with gcc3, gcc4 (rightly?) borks about this:

c++ -DHAVE_CONFIG_H -I. -I./gen -I./common -I./interfaces/cc/ -I./modules/speller/default/ -DLOCALEDIR=\"/usr/pkg/share/locale\" -O2 -fno-exceptions -MT modules/filter/nroff.lo -MD -MP -MF modules/filter/.deps/nroff.Tpo -c modules/filter/nroff.cpp  -fPIC -DPIC -o modules/filter/.libs/nroff.o
modules/filter/nroff.cpp:76: error: extra qualification '<unnamed>::NroffFilter::' on member 'process_char'
gmake[1]: *** [modules/filter/nroff.lo] Error 1

>Fix:

Correct the declaration.

$NetBSD$

--- modules/filter/nroff.cpp.orig	2005-02-20 22:49:18.000000000 +0100
+++ modules/filter/nroff.cpp
@@ -73,7 +73,7 @@ namespace {
       return false;
     }
     
-    bool NroffFilter::process_char (FilterChar::Chr c);
+    bool process_char (FilterChar::Chr c);
       
   public:
 

>Unformatted: