Issue 152293
Summary When compiling C to IA-32, Clang makes `wchar_t` an alias of `int`
Labels clang
Assignees
Reporter pascal-cuoq
    When targeting IA-32, Clang defines `wchar_t` as `int`. GCC chooses to define it as `long`. This makes the program below behave differently between one and the other (CE link: https://gcc.godbolt.org/z/jxsqP91zz ):
```
#include <stdio.h>

int main(void) {
    char * r =
    _Generic(L'a',
 int:"int",
    unsigned:"unsigned",
    long:"long",
    unsigned long:"unsigned long");
    printf("wchar_t is %s\n", r);
}
```

_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to