[Bug c++/87783] New: `class A<int>;` is incorrectly accepted at namespace or class scope

ensadc at mailnesia dot com gcc-bugzilla@gcc.gnu.org
Mon Oct 29 08:17:00 GMT 2018


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.


More information about the Gcc-bugs mailing list