http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53324

--- Comment #2 from Jonathan Wakely <redi at gcc dot gnu.org> 2012-05-11 
17:20:13 UTC ---
N.B. this is basically the same scenario as if you compiled x.C, then changed
XX::getme to return a std::list instead of std::deque, then compiled y.C -- it
would link, but crash at runtime.  This is a general "feature" of C++
name-mangling and separrate compilation, not specific to our debug mode.

If you create a file called "deque" in the same directory containing:

#include <list>
#define deque list

then change the makefile to build y.o with this rule, not using debug mode:

y.o: y.C
        g++ -c  -I. y.C

then it will link (even though you can't assign std::list to std::deque, i.e.
your suggestion won't help) but it will segfault when run.

Reply via email to