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: [PATCH][C++] Fix PR29433, make C++ use a lot less time/memory

On Mon, 11 Dec 2006, Jason Merrill wrote:

> Nathan Sidwell wrote:
> > Jason Merrill wrote:
> > 
> > > When we see the first T in "T T();" we have no idea that it's supposed to
> > > be a type-specifier, so we can't look it up specially.
> > 
> > I don't understand, we must be looking it up specially, otherwise the struct
> > stat hack wouldn't work.
> No.  We are looking it up normally, but the member function declaration has
> not been processed yet, so lookup finds the outer declaration.
> Without a special rule, this would be well-formed.  I assume that the rule is
> there to allow for compilers to use some sort of delayed parsing of member
> declarations.
> I guess that we were missing this diagnostic before by accident, because of
> the different DECL_NAMEs for class template instantiations.  If we want to
> avoid the memory usage for different DECL_NAMEs, I'd think you'd have to hack
> around a lot to avoid giving this (correct) diagnostic here.
> My inclination would be to make the change, and downgrade the error to
> pedwarn.  There's no need for it to be a hard error.

Note that we cannot simply apply the proposed patch as it changes
debug info (and maybe also diagnostics, but at least we don't have
testsuite entry for regressions there).


Richard Guenther <>
Novell / SUSE Labs

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