[llvm-bugs] [Bug 24706] New: clang generate wrong WORD mode for x32

via llvm-bugs llvm-bugs at lists.llvm.org
Fri Sep 4 10:12:37 PDT 2015


https://llvm.org/bugs/show_bug.cgi?id=24706

            Bug ID: 24706
           Summary: clang generate wrong WORD mode for x32
           Product: new-bugs
           Version: trunk
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: new bugs
          Assignee: unassignedbugs at nondot.org
          Reporter: hjl.tools at gmail.com
                CC: llvm-bugs at lists.llvm.org
    Classification: Unclassified

[hjl at gnu-6 bin]$ cat /tmp/i.c
typedef unsigned int gcc_word __attribute__((mode(word)));

int foo[8 == sizeof(gcc_word) ? 1 : -1];
[hjl at gnu-6 bin]$ ./clang -S -mx32 /tmp/i.c
/tmp/i.c:3:9: error: 'foo' declared as an array with a negative size
int foo[8 == sizeof(gcc_word) ? 1 : -1];
        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1 error generated.
[hjl at gnu-6 bin]$ gcc -S -mx32 /tmp/i.c
[hjl at gnu-6 bin]$

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20150904/30b7a1ab/attachment.html>


More information about the llvm-bugs mailing list