This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: collect2 / ld giving strange errors with undefined virtual functions
- To: egcs at egcs dot cygnus dot com
- Subject: Re: collect2 / ld giving strange errors with undefined virtual functions
- From: "Martin v. Loewis" <martin at Mira dot isdn dot cs dot tu-Berlin dot de>
- Date: Fri, 26 Mar 1999 10:04:57 +0100
- Cc: oliva at dcc dot unicamp dot br
> Yup. But this error is impossible to detect within the compiler, and
> when we get to the linker, it's too late :-(
Would it be worth to introduce another linker feature here. GNU ld
already has the linker_warning: a message is printed whenever a
specific symbol definition is used. glibc uses it to warn about calls
to unreliable functions.
The feature I'm proposing is different: Whenever the linker ends up
with an undefined symbol, it will print a message like
undefined reference to `A virtual table'
There is no definition of `A::foo(int)'.
What do you think?
Martin