problem with STL implementation
George Trojan
trojan@thunder.nws.noaa.gov
Mon Aug 2 13:24:00 GMT 1999
The following code compiles fine with egcs 2.91:
// baz.c
#include <vector>
class S {
public:
typedef int (S::*pf)();
int foo();
int bar();
vector<pf> d_pf;
};
int main()
{
S s;
return 0;
}
egcs 2.95 produces an error:
g++ -v baz.c
Reading specs from
/opt3/egcs/lib/gcc-lib/hppa1.1-hp-hpux10.20/2.95/specs
gcc version 2.95 19990728 (release)
/opt3/egcs/lib/gcc-lib/hppa1.1-hp-hpux10.20/2.95/cpp -lang-c++ -v
-D__GNUC__=2
-D__GNUG__=2 -D__GNUC_MINOR__=95 -D__cplusplus -Dhppa -Dhp9000s800
-D__hp9000s80
0 -Dhp9k8 -DPWB -Dhpux -Dunix -D__hppa__ -D__hp9000s800__ -D__hp9000s800
-D__hp9
k8__ -D__PWB__ -D__hpux__ -D__unix__ -D__hppa -D__hp9000s800 -D__hp9k8
-D__PWB -
D__hpux -D__unix -Asystem(unix) -Asystem(hpux) -Acpu(hppa)
-Amachine(hppa) -D__E
XCEPTIONS -D__hp9000s700 -D_PA_RISC1_1 -D_HPUX_SOURCE -D_HIUX_SOURCE
sin.c /var/
tmp/cc5bYbzj.ii
GNU CPP version 2.95 19990728 (release) (hppa)
#include "..." search starts here:
#include <...> search starts here:
/opt3/egcs/lib/gcc-lib/hppa1.1-hp-hpux10.20/2.95/../../../../include/g++-3
/opt3/egcs/lib/gcc-lib/hppa1.1-hp-hpux10.20/2.95/../../../../hppa1.1-hp-hpux10.
20/include
/opt3/egcs/lib/gcc-lib/hppa1.1-hp-hpux10.20/2.95/include
/usr/include
End of search list.
The following default directories have been omitted from the search
path:
/usr/local/include
End of omitted list.
/opt3/egcs/lib/gcc-lib/hppa1.1-hp-hpux10.20/2.95/cc1plus
/var/tmp/cc5bYbzj.ii -
quiet -dumpbase sin.cc -version -o /var/tmp/ccbwWrKQ.s
GNU C++ version 2.95 19990728 (release) (hppa1.1-hp-hpux10.20) compiled
by GNU C
version 2.95 19990728 (release).
/opt3/egcs/lib/gcc-lib/hppa1.1-hp-hpux10.20/2.95/../../../../include/g++-3/stl_a
lloc.h: In instantiation of `allocator<int (S::*)()>':
sin.c:15: instantiated from here
/opt3/egcs/lib/gcc-lib/hppa1.1-hp-hpux10.20/2.95/../../../../include/g++-3/stl_a
lloc.h:750: `allocator<int (S::*)()>::address(int (S::* &)()) const' has
already
been declared in `allocator<int (S::*)()>'
More information about the Gcc-bugs
mailing list