This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64670

--- Comment #10 from Jason Merrill <jason at gcc dot gnu.org> ---
(In reply to Tobias Burnus from comment #9)
> In the real code, one has something like the following, which I tried to
> mimic in the test case. If I understood your comment correctly, I should use
> in "log.c" not only 'implementation "log.h"' but additionally(?)
> 'implementation "LogListener.h"' - i.e. using 'pragma implementation' for
> LogListener.h's classes only in LogListener.h is not sufficient?

Having #pragma implementation in LogListener.cc is sufficient:

> The real-world LogListener.o has (full output as it is short):
...
> 0000000000000000 V typeinfo for LogListener

So why are you getting an undefined reference?


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]