This is the mail archive of the gcc-patches@gcc.gnu.org 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 Sat, 9 Dec 2006, Mark Mitchell wrote:

| 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.

yes.

|  But, it wouldn't: it
| would still find the global T, since type-specifiers are looked up
| specially.

I believe that special rule applies only if we used "struct" in front of
the first "T", e.g.

   struct T { };
   struct S {
      struct T T();
   };

is valid.

[...]

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

I was in the middle of composing the mail when I just got this message :-)
You should see the reflector message in a moment.

-- Gaby


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