This is the mail archive of the
mailing list for the GCC project.
Re: confusing diagnostics
- To: Joe Buck <jbuck at racerx dot synopsys dot com>
- Subject: Re: confusing diagnostics
- From: Gabriel Dos Reis <gdr at codesourcery dot com>
- Date: 11 Jan 2001 19:39:35 +0100
- Cc: gdr at codesourcery dot com (Gabriel Dos Reis), Ulrich dot Lauther at mchp dot siemens dot de, gcc at gcc dot gnu dot org
- Organization: CodeSourcery, LLC
- References: <200101111748.JAA29185@racerx.synopsys.com>
Joe Buck <email@example.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.
CodeSourcery, LLC http://www.codesourcery.com