confusing diagnostics
Gabriel Dos Reis
gdr@codesourcery.com
Thu Jan 11 10:40:00 GMT 2001
Joe Buck <jbuck@racerx.synopsys.com> writes:
[...]
| > | /tmp/ccRtcD7X.o: In function `bar type_info function':
| > | /tmp/ccRtcD7X.o(.gnu.linkonce.t.__tf3bar+0x10): undefined reference to `foo type_info function'
| >
| > I think we've been through this in the past. What the compiler+linker
| > is attempting to say is that some virtuals were undefined.
|
| Some compiler vendors have the linker add a "hint message" when such
| errors occur. For example, Sun's CC says
|
| [Hint: try checking whether the first non-inlined, non-pure virtual function of class foo is defined]
|
| and HP's aCC says
|
| /usr/ccs/bin/ld: Unsatisfied symbols:
| Class tables [Vftptr] dependent on key function: "foo::do_something()" (data)
| typeid<foo> (data)
|
| One possibility would be to add such a message to collect2 if it sees
| complaints about missing vtables or type_info; it would then have to
| parse the error stream. Or GNU ld could add it, but that wouldn't help
| on platforms that don't use GNU ld.
This sounds reasonable to me.
-- Gaby
CodeSourcery, LLC http://www.codesourcery.com
More information about the Gcc
mailing list