> gcc -v Using built-in specs. Target: i686-pc-linux-gnu Configured with: ./configure --with-gmp=/home/pneveu/apps/gcc-4.1.2/gmp --with-mpfr=/home/pneveu/apps/gcc-4.1.2/mpfr --prefix=/build/pcitools/gcc4.1.2 Thread model: posix gcc version 4.1.2
If you compile the file before.cpp, with and without defining the PRINT_TYPE_INFO_BEFORE define, the type_info::before() function will not generate the same output. Here are the steps to reproduce the bug: In this case A is not before B: typeid(A).before(typeid(B)) == false > g++ before.cpp -o before > ./before A is before B: 0 typeid(A).name(): 1A typeid(B).name(): 1B In this case A is before B: typeid(A).before(typeid(B)) == true > g++ -DPRINT_TYPE_INFO_NAME_BEFORE before.cpp -o before > ./before typeid(A).name(): 1A typeid(B).name(): 1B A is before B: 1 Regards, Phelippe Neveu -- Summary: type_info::before() will not return the same value Product: gcc Version: 4.1.2 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: pneveu at pcigeomatics dot com http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33016