This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
g++ differences compiled directly vs. compiled 2 steps with -E
- To: gcc-bugs at gcc dot gnu dot org
- Subject: g++ differences compiled directly vs. compiled 2 steps with -E
- From: Sean McNeil <sean at mcneil dot com>
- Date: 25 May 2001 11:52:17 -0700
Hello,
I am not on this mailing list, but I believe this to be a bug of some
kind....
I have a file that I compile two different ways as...
arm-wrs-vxworks-g++ -mcpu=arm8 -mapcs-32 -mlittle-endian -ansi -nostdinc
-pipe -fno-implicit-templates -DVXW_EXPLICIT_TEMPLATES -O2
-mno-sched-prolog -I/usr/wind/target/h -DCPU=ARMARCH4 -DARMEL
-fno-exceptions -o /tmp/ttt.o -c PlotFile.cpp
and as
arm-wrs-vxworks-g++ -E -mcpu=arm8 -mapcs-32 -mlittle-endian -ansi
-nostdinc -pipe -fno-implicit-templates -DVXW_EXPLICIT_TEMPLATES -O2
-mno-sched-prolog -I/usr/wind/target/h -DCPU=ARMARCH4 -DARMEL
-fno-exceptions -o /tmp/ttt.cc -c PlotFile.cpp
arm-wrs-vxworks-g++ -mcpu=arm8 -mapcs-32 -mlittle-endian -ansi -nostdinc
-pipe -fno-implicit-templates -DVXW_EXPLICIT_TEMPLATES -O2
-mno-sched-prolog -I/usr/wind/target/h -DCPU=ARMARCH4 -DARMEL
-fno-exceptions -o /tmp/ttt.o -c /tmp/ttt.cc
I get extremely different results in both cases. What prompted this
test is that I noticed I was getting unresolved references to
operator delete(void*)
yet this particular file doesn't use a delete operator at all. The
second method I used in compiling actually gave me results that I
expected. A clean list of defined and undefined symbols. The first run
gives me all kinds of symbols that I never expected (expecially the
undefined reference above).
Does anyone have any idea what is going on? I should think that both of
the compilations above would be exactly equivalent. g++ is definately
not behaving as I expected.
Thanks for any information in advance,
Sean