[PATCH][C++] Fix PR29433, make C++ use a lot less time/memory

Gabriel Dos Reis gdr@cs.tamu.edu
Sun Dec 10 23:38:00 GMT 2006


On Sun, 10 Dec 2006, Mark Mitchell wrote:

| Jason Merrill wrote:
|
| >> 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.
| >
| > It also applies before ::, but that also doesn't apply to this case.
| > 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.
|
| Good point.  I'm not sure if we gate the diagnostic on the use of an
| explicit "struct" (or "class", etc.) keyword.

The above program is accepted by G++, and I beleieve we do properly
(i.e. it does not find the "right" T" by accident).

-- Gaby



More information about the Gcc-patches mailing list