[Bug sanitizer/64670] -fsanitize=vptr leads to "undefined reference to `typeinfo for class'"

jason at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Thu Jan 29 15:52:00 GMT 2015


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.



More information about the Gcc-bugs mailing list