Francois Pichet | 159a7b3 | 2011-07-22 08:52:55 +0000 | [diff] [blame] | 1 | // RUN: %clang -fsyntax-only -verify %s |
2 | // RUN: %clang -fsyntax-only -verify -fshort-wchar %s | ||||
Sean Hunt | f818a8b | 2011-07-21 22:01:12 +0000 | [diff] [blame] | 3 | |
4 | #include <limits.h> | ||||
5 | |||||
6 | const bool swchar = (wchar_t)-1 > (wchar_t)0; | ||||
7 | |||||
8 | #ifdef __WCHAR_UNSIGNED__ | ||||
9 | int signed_test[!swchar]; | ||||
10 | #else | ||||
11 | int signed_test[swchar]; | ||||
12 | #endif | ||||
13 | |||||
14 | int max_test[WCHAR_MAX == (swchar ? -(WCHAR_MIN+1) : (wchar_t)-1)]; | ||||
15 | int min_test[WCHAR_MIN == (swchar ? 0 : -WCHAR_MAX-1)]; |