https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87783
Bug ID: 87783 Summary: `class A<int>;` is incorrectly accepted at namespace or class scope Product: gcc Version: unknown Status: UNCONFIRMED Keywords: accepts-invalid Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: ensadc at mailnesia dot com Target Milestone: --- https://wandbox.org/permlink/L5JYCDnEfKmftRlr ---- template<class> class A {}; class A<int>; ---- Both Clang and MSVC appear to treat `class A<int>;` as an invalid explicit template specialization. GCC does the same at block scope, but incorrectly accepts this declaration at namespace or class scope.