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

           Summary: Negative array dimensions allowed in template
                    instantiations
           Product: clang
           Version: trunk
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P5
         Component: C++
        AssignedTo: [email protected]
        ReportedBy: [email protected]
                CC: [email protected], [email protected]


cop...@overthere:~$ clang -x c++ -
#include <stdio.h>

template <typename T>
struct bar {
  int i [sizeof(T)-2];
};

int main () { bar<char> b; printf("%d\n", sizeof(b.i)); };

cop...@overthere:~$ ./a.out
-4
cop...@overthere:~$

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