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

           Summary: kernel compiling: size of array is negative
           Product: clang
           Version: trunk
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: -New Bugs
        AssignedTo: [email protected]
        ReportedBy: [email protected]
                CC: [email protected]


When compiling Linux kernel 3.0, gcc accepts this code at -O2 level. But clang
rejects it. Gcc also rejects it at -O0.

void f(int offset) {
  ((void)sizeof(char[1 - 2*!!(!__builtin_constant_p(offset))]));
}

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