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]
Other format: [Raw text]

Re: [trunk][patch] Don't print warnings in mangle_decl

Rafael Espindola wrote:

> 2009-04-16  Rafael Avila de Espindola  <>
> 	* cp-tree.h (lang_identifier): Add ABI_WARNING.
> 	* decl.c (cp_finish_decl): Print warning for ABI changes.
> 	* mangle.c (finish_mangling_internal): Don't print warning. Set
> 	ABI_WARNING if one is needed. Update all callers.
> 	* semantics.c (expand_or_defer_fn): Print warning for ABI changes.

Rafael, you're going to hate me.  I apologize.

The problem with this approach -- which is exactly what I suggested --
is that it's going to cause us to generate mangled names for every
variable, even ones where we don't need the mangled name.  And we worked
pretty hard a while back to try to make mangling lazy, because
allocating all the memory for mangled names made the compiler a lot slower.

So, what do we do?  I'd like this to be lazy.  But, that means that
we're going to generate mangled names somewhere late in the game, maybe
when generating GENERIC.  And that's not at a predictable place in the
front end, which is what you were looking for so that we could do nice
error generation.  I don't see how we can have both of laziness and
errors at the point of declaration.

Jason, what do you think?  What's the right tradeoff here?


Mark Mitchell
(650) 331-3385 x713

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