http://llvm.org/bugs/show_bug.cgi?id=8020

           Summary: clang c++ incorrectly accepts template keyword on
                    non-template definition
           Product: clang
           Version: unspecified
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Keywords: accepts-invalid
          Severity: normal
          Priority: P
         Component: C++
        AssignedTo: [email protected]
        ReportedBy: [email protected]
                CC: [email protected], [email protected]


Testcase:
template <typename T> struct X { X() {} };
template<> struct X<int> { X(); };
template X<int>::X() {}

clang accepts; for comparison, error from comeau:
"ComeauTest.c", line 3: error: "X<int>::X()" is not an entity that can be
          instantiated
  template X<int>::X() {} 
                   ^

"ComeauTest.c", line 3: error: expected a ";" (perhaps on the previous
statement)
  template X<int>::X() {} 
                       ^

-- 
Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
_______________________________________________
LLVMbugs mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/llvmbugs

Reply via email to