This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug sanitizer/64670] -fsanitize=vptr leads to "undefined reference to `typeinfo for class'"
- From: "burnus at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Fri, 30 Jan 2015 13:15:15 +0000
- Subject: [Bug sanitizer/64670] -fsanitize=vptr leads to "undefined reference to `typeinfo for class'"
- Auto-submitted: auto-generated
- References: <bug-64670-4 at http dot gcc dot gnu dot org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64670
--- Comment #6 from Tobias Burnus <burnus at gcc dot gnu.org> ---
Created attachment 34628
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=34628&action=edit
Updated test case (part 2/2): [aux file]
Updated test case. The first file matches what the original source code had:
#pragma interface
in the header and
#pragma implementation "file.h"
in the implementation. However, "class LogListener" is only forward declared in
the header file - and in the actual implementation also includes
"LogListener.h", which also has "#pragma interface".
The LogListener.cc file includes LogListener.h and has "#pragma
implementation".
For my "aux file", no symbol is generated at all. For the real-world
LogListener.cc, a "V typeinfo for LogListener" is created and "W
LogListener::LogListener()". (In the original file, a class inheriting from
LogListener is declared (.h) and implemented (.cc).)