This is the mail archive of the binutils@sources.redhat.com mailing list for the binutils 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]

Re: Feature request: undefined-symbol hints


>>>>> "Martin" == Martin v Löwis <loewis@informatik.hu-berlin.de> writes:

 Martin> In C++, the compiler emits a number of implicit symbols
 Martin> (vtable, typeinfo). To avoid code duplication, these are only
 Martin> defined together with some user-defined symbol (the first
 Martin> virtual function in a class).

 Martin> If the user fails to define that symbol, the implicit symbols
 Martin> are not defined, either. Users are often confused by the
 Martin> linker error messages in these cases.

Count me as one confused by those errors.  They always went away after
"some tinkering" but I never realized what the magic word is.

It seems to me the solution is NOT to create hacks that produce new
warnings.  You described the real problem in the first paragraph.  The
compiler/linker should be able to deal with duplicate definitions of
these implicit symbols so the compiler can just emit them and the
linker will make it right.  That way these internal things are not
tied to irrelevant details like the first user-defined virtual
function.  

	   paul


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