[Bug c++/116099] Inconsistent errors for ClassTemplate and ClassTemplate

2024-07-25 Thread redi at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=116099 --- Comment #5 from Jonathan Wakely --- Ha, so because it doesn't know what `const Oops` is, g++ applies the implicit-int rule and decides it's `const int Oops` i.e. a non-type template parameter, but that's invalid because `template struct S` i

[Bug c++/116099] Inconsistent errors for ClassTemplate and ClassTemplate

2024-07-25 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=116099 Andrew Pinski changed: What|Removed |Added Ever confirmed|0 |1 Last reconfirmed|

[Bug c++/116099] Inconsistent errors for ClassTemplate and ClassTemplate

2024-07-25 Thread redi at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=116099 --- Comment #3 from Jonathan Wakely --- I didn't find a match for the "ISO C++ forbids declaration of 'type name' with no type" text, but we certainly have some bugs about implicit int causing bad recovery.

[Bug c++/116099] Inconsistent errors for ClassTemplate and ClassTemplate

2024-07-25 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=116099 --- Comment #2 from Andrew Pinski --- This might be a dup ...

[Bug c++/116099] Inconsistent errors for ClassTemplate and ClassTemplate

2024-07-25 Thread redi at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=116099 --- Comment #1 from Jonathan Wakely --- For comparison, Clang also doesn't give consistent errors: x.cc:3:3: error: use of undeclared identifier 'Oops' 3 | S o; | ^ x.cc:4:9: error: unknown type name 'Oops' 4 | S oo; |