EGCS 1.1b template handling bug (1.0.2 worked)
Lassi A. Tuura
lat@iki.fi
Tue Nov 3 01:57:00 GMT 1998
Compiling the attached little program worked on EGCS 1.0.2 (on HP-UX
10.20). Compiling it with g++ 2.7.2.3 works as long as USE_ZB is not
defined (again, HP-UX 10.20). If compiled with -DUSE_ZB=1 with g++
2.7.2.3, I get:
foo.cxx: In method `int Z<A,int,0>::f(struct A *)':
foo.cxx:12: `Member' undeclared (first use this function)
foo.cxx:12: (Each undeclared identifier is reported only once
foo.cxx:12: for each function it appears in.)
With EGCS 1.1b on Linux (with or without -DUSE_ZB=1):
$ c++ -v foo.cxx
Reading specs from /usr/local/lib/gcc-lib/i686-pc-linux-gnu/egcs-2.91.57/specs
gcc version egcs-2.91.57 19980901 (egcs-1.1 release)
/usr/local/lib/gcc-lib/i686-pc-linux-gnu/egcs-2.91.57/cpp -lang-c++ -v -undef -D__GNUC__=2 -D__GNUG__=2 -D__cplusplus -D__GNUC_MINOR__=91 -D__ELF__ -Dunix -Dlinux -D__ELF__ -D__unix__ -D__linux__ -D__unix -D__linux -Asystem(posix) -D__EXCEPTIONS -Asystem
(unix) -Acpu(i386) -Amachine(i386) -Di386 -D__i386 -D__i386__ -Di686 -Dpentiumpro -D__i686 -D__i686__ -D__pentiumpro -D__pentiumpro__ foo.cxx /tmp/ccQXc48x.ii
GNU CPP version egcs-2.91.57 19980901 (egcs-1.1 release) (i386 Linux/ELF)
#include "..." search starts here:
#include <...> search starts here:
/usr/local/include/g++
/usr/local/include
/usr/local/lib/gcc-lib/i686-pc-linux-gnu/egcs-2.91.57/include
/usr/include
End of search list.
/usr/local/lib/gcc-lib/i686-pc-linux-gnu/egcs-2.91.57/cc1plus /tmp/ccQXc48x.ii -quiet -dumpbase foo.cc -version -o /tmp/ccTUSucP.s
GNU C++ version egcs-2.91.57 19980901 (egcs-1.1 release) (i686-pc-linux-gnu) compiled by GNU C version egcs-2.91.57 19980901 (egcs-1.1 release).
foo.cxx:12: sorry, not implemented: `const_cast_expr' not supported by dump_type
foo.cxx: In method `int Z<A,int,1>::f<A, int, 1>(struct A *)':
foo.cxx:25: instantiated from here
foo.cxx:12: `*1' cannot be used as a member pointer, since it is of type `'
Cheers,
//lat
--
With sufficient thrust, pigs fly just fine. However, this is not
necessarily a good idea. It is hard to be sure where they are going
to land, and it could be dangerous sitting under them as they fly
overhead. --RFC1925, "The Twelve Networking Truths"
More information about the Gcc-bugs
mailing list