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: "jason at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Thu, 29 Jan 2015 15:52:38 +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 #4 from Jason Merrill <jason at gcc dot gnu.org> ---
This seems like a bug in the user's code, not the compiler. If the class is
defined in a header with #pragma interface, there needs to be a matching
#pragma implementation somewhere to cause the typeinfo and such to be emitted.
clang doesn't run into this because it just ignores #pragma interface.