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

Gabriel Dos Reis wrote:

> |   struct T {};
> |   struct S {
> |     T T();
> |   };
> | 
> | name lookup for the T appearing as a type-specifier would still find the
> | outer T, and that therefore the binding to the member function T does
> | not affect validity.
> I don't follow that reasoning.

The standard says that its an error if name lookup would find a
different binding after the class is complete.  But, it wouldn't: it
would still find the global T, since type-specifiers are looked up

> | More importantly, we know that this code is in our testsuite, in
> | libstdc++, and accepted by EDG -- all of which suggests that this
> | construct is likely in relatively widespread use.  I'm not sure that
> | it's a good tradeoff to break that code for the sake of a diagnostic
> | which is explicitly not required by the standard.
> And the code is explicitly invalid.  And we already reject the code,
> and at some point in the past, we regressed and got PR filled for that
> regression. I don't believe we have to lower the quality to in the
> search of mimicing EDG.   

That's a strawman.  The point isn't "mimicing EDG" -- it's respecting
the cost we impose on our userbase by tightening up the front end.

If you're confident that the code is invalid, would you mind asking on
the core reflect to double-check?

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]