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

On Fri, Apr 17, 2009 at 8:28 AM, Rafael Espindola <> wrote:
>> 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.
> For every variable? I don't think so. The new uses of
> DECL_ASSEMBLER_NAME were placed close to where the C++ FE handles data
> to the ME. For example, I am almost sure that we don't produce a
> warning for unused external variables.
> The call to warning that is responsible for template instantiation has
> to stay close to where it is. The FE uses some global variables to
> decide if it should print the "instantiated from" info.
> The other call to warning can probably be moved somewhere else and
> replaced with warning_at.
>> 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.

Indeed, that sounds hard.  I'd prefer faster compliation and less memory usage

> We can benchmark it :-)
> Do you remember which tests benefited the most from using lazy mangling?

I remember that boost MPL testcases improved a lot back in time when we
improved mangling.  Should be one of the testcases monitored by


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