https://gcc.gnu.org/bugzilla/show_bug.cgi?id=116099

Andrew Pinski <pinskia at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
     Ever confirmed|0                           |1
   Last reconfirmed|                            |2024-07-25
             Status|UNCONFIRMED                 |NEW
           See Also|                            |https://gcc.gnu.org/bugzill
                   |                            |a/show_bug.cgi?id=25751

--- Comment #4 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Confirmed.
Looks like the front-end is parsing as a declaration.

Take:
```
template<class T> struct S { };
S<int Oops1> oo;
```

This just says:
```
<source>:4:12: error: template argument 1 is invalid
    4 | S<int Oops1> oo;
      |            ^
```

But why.

Clang produces for the above testcase:
```
<source>:4:7: error: type-id cannot have a name
    4 | S<int Oops1> oo;
      |       ^~~~~
```

Reply via email to