This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
preprocessor/2947: different behaviour directly to C++ vs. saving -E output
- To: gcc-gnats at gcc dot gnu dot org
- Subject: preprocessor/2947: different behaviour directly to C++ vs. saving -E output
- From: sean at mcneil dot com
- Date: 25 May 2001 22:12:58 -0000
- Reply-To: sean at mcneil dot com
>Number: 2947
>Category: preprocessor
>Synopsis: different behaviour directly to C++ vs. saving -E output
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: unassigned
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Fri May 25 15:16:00 PDT 2001
>Closed-Date:
>Last-Modified:
>Originator: Sean McNeil
>Release: 3.1 20010524 (experimental)
>Organization:
>Environment:
FreeBSD 4.3 cross compiling to arm-wrs-vxworks
>Description:
When I compile a c++ file with the standard method of
arm-wrs-vxworks-gcc -c file.cpp
I get many additional undefined symbols that are bogus in the object file. The preprocessor is obviously sending too much information to the backend. If I compile in two steps:
arm-wrs-vxworks-gcc -E -o file.cc file.cpp
arm-wrs-vxworks-gcc -c file.cc
I observe the expected behavior and symbols are correct (no additional symbols).
>How-To-Repeat:
Compile the attached file equivalently as
arm-wrs-vxworks-gcc -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 -c PlotFile.cpp
Observe that there is a significant difference compiled this was a oppose to first with the -E option and then compiling that output.
>Fix:
>Release-Note:
>Audit-Trail:
>Unformatted:
----gnatsweb-attachment----
Content-Type: text/cpp; name="PlotFile.cpp"
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename="PlotFile.cpp"