This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/33871] typeinfo name referenced in ... defined in discarded section
- From: "gcc at magfr dot user dot lysator dot liu dot se" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 29 Oct 2007 00:04:22 -0000
- Subject: [Bug c++/33871] typeinfo name referenced in ... defined in discarded section
- References: <bug-33871-5606@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #5 from gcc at magfr dot user dot lysator dot liu dot se 2007-10-29 00:04 -------
Created an attachment (id=14430)
--> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=14430&action=view)
Testcase demonstrating the problem
To reproduce, compile using
g++ S1.C S1.C
Yes - S1.C should be on the command line twice.
Using 4.2 this gives me
(.text+0x18): undefined reference to `main'
Using 4.3 this gives me
(.text+0x18): undefined reference to `main'
`typeinfo name for (anonymous namespace)::t' referenced in section `.rodata' of
/tmp/ccfcbvzr.o: defined in discarded section
`.rodata._ZTSN12_GLOBAL__N_11tE[typeinfo name for (anonymous namespace)::t]' of
/tmp/ccfcbvzr.o
To remove the undefined reference to main problem, add a trivial main (int
main() { }) to the compile.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33871