[LLVMbugs] [Bug 8147] New: clang accepts an invalid program

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Tue Sep 14 12:51:37 PDT 2010


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

           Summary: clang accepts an invalid program
           Product: clang
           Version: trunk
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: C++
        AssignedTo: unassignedclangbugs at nondot.org
        ReportedBy: pip88nl at gmail.com
                CC: llvmbugs at cs.uiuc.edu, dgregor at apple.com


In C++03 mode, clang should reject the following program:


// BEGIN
template<typename T>
void func (T) { }

enum { foo = 255 };

int main () {
  func (foo);
}
// END


It is accepted by:
clang version 2.9 (trunk 113840)
Target: x86_64-pc-linux-gnu
Thread model: posix

In C++0x, using anonymous types as template parameters is valid, in C++03, it
is not.

-- 
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.



More information about the llvm-bugs mailing list