[LLVMbugs] [Bug 2204] New: clang: sizeof(int16_t) != 2

bugzilla-daemon at cs.uiuc.edu bugzilla-daemon at cs.uiuc.edu
Mon Apr 7 10:07:14 PDT 2008


           Summary: clang: sizeof(int16_t) != 2
           Product: clang
           Version: unspecified
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Semantic Analyzer
        AssignedTo: unassignedbugs at nondot.org
        ReportedBy: edwintorok at gmail.com
                CC: llvmbugs at cs.uiuc.edu

Compile the below testcase with clang, it aborts on Linux x86-64:

#include <stdlib.h>
#include <stdint.h>
int main()
        if(sizeof(int16_t) != 2)

$ /home/edwin/llvm-svn/llvm/tools/clang/utils/ccc foo.c
clang -emit-llvm-bc -o foo.o foo.c
llvm-ld -native -disable-internalize -o a.out foo.o
$ ./a.out

Look at the declarations of int16_t from the headers, I think that attribute is
not handled.

/home/edwin/llvm-svn/llvm/tools/clang/utils/ccc foo.c -E|grep int16_t
typedef signed short int __int16_t;
typedef unsigned short int __uint16_t;
typedef int int16_t __attribute__ ((__mode__ (__HI__)));
typedef unsigned int u_int16_t __attribute__ ((__mode__ (__HI__)));
typedef unsigned short int uint16_t;
 if(sizeof(int16_t) != 2)

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