This is the mail archive of the 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]

Re: confusing diagnostics

Joe Buck <> 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             

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