This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

wrong syntax check with egcs-1.1.2 and namespace


I get a wrong "first declared here" message in a rather large piece of code.
I tried to cut it down, but it is still  1903 lines after expanding all includes
and macros.
Before I send the whole stuff, is this the correct group to address?

Below is - for now - just the output I get:

Reading specs from /usr/lib/gcc-lib/i386-pc-linux-gnulibc1/egcs-2.91.66/specs
gcc version egcs-2.91.66 19990314 (egcs-1.1.2 release)
 /usr/lib/gcc-lib/i386-pc-linux-gnulibc1/egcs-2.91.66/cpp -lang-c++ -v -undef -D__GNUC__=2 -D__GNUG__=2 -D__cplusplus -D__GNUC_MINOR__=91 -D__ELF__ -Dunix -Di386 -D__i386__ -Dlinux -D__ELF__ -D__unix__ -D__i386__ -D__i386__ -D__linux__ -D__unix -D__i386 -D__linux -Asystem(posix) -D__EXCEPTIONS -Asystem(unix) -Acpu(i386) -Amachine(i386) -Di386 -D__i386 -D__i386__ out.C /tmp/ccyDkiDh.ii
GNU CPP version egcs-2.91.66 19990314 (egcs-1.1.2 release) (i386 Linux/ELF)
#include "..." search starts here:
#include <...> search starts here:
 /usr/include/g++
 /usr/lib/g++-include
 /usr/local/include
 /usr/i386-pc-linux-gnulibc1/include
 /usr/lib/gcc-lib/i386-pc-linux-gnulibc1/egcs-2.91.66/include
 /usr/include
End of search list.
 /usr/lib/gcc-lib/i386-pc-linux-gnulibc1/egcs-2.91.66/cc1plus /tmp/ccyDkiDh.ii -quiet -dumpbase out.cc -version -o /tmp/ccozaOrq.s
GNU C++ version egcs-2.91.66 19990314 (egcs-1.1.2 release) (i386-pc-linux-gnulibc1) compiled by GNU C version egcs-2.91.60 19981201 (egcs-1.1.1 release).
out.C:2530: use of `Hnode' is ambiguous
out.C:1903:   first declared as `class Hnode' here
out.C:1997:   also declared as `class ::turbo::Hnode' here
out.C:2530: use of `Hnode' is ambiguous
out.C:1903:   first declared as `class Hnode' here
out.C:1997:   also declared as `class ::turbo::Hnode' here
out.C:2530: use of `Hnode' is ambiguous
out.C:1903:   first declared as `class Hnode' here
out.C:1997:   also declared as `class ::turbo::Hnode' here
out.C:2530: parse error before `,'

line 1903 contains:
slist<poly_point,slink> points;

The problem goes away when I don't use namespaces.
-- 
	-lauther

----------------------------------------------------------------------------
Ulrich Lauther          ph: +49 89 636 48834 fx: ... 636 42284
Siemens ZT SE 4         Internet: Ulrich.Lauther@mchp.siemens.de
-- 
	-lauther

----------------------------------------------------------------------------
Ulrich Lauther          ph: +49 89 636 48834 fx: ... 636 42284
Siemens ZT SE 4         Internet: Ulrich.Lauther@mchp.siemens.de


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]