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


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