Francois Pichet | 7f1e2a5 | 2011-07-22 10:49:54 +0000 | [diff] [blame] | 1 | // RUN: %clang_cc1 -ffreestanding -fsyntax-only -verify %s |
| 2 | // RUN: %clang_cc1 -ffreestanding -fsyntax-only -verify -fshort-wchar %s |
Andy Gibbs | c6e68da | 2012-10-19 12:44:48 +0000 | [diff] [blame] | 3 | // expected-no-diagnostics |
Alexis Hunt | 82bb089 | 2011-07-21 22:01:12 +0000 | [diff] [blame] | 4 | |
Eric Christopher | bd202c0 | 2011-09-08 23:25:25 +0000 | [diff] [blame] | 5 | #include <stdint.h> |
Alexis Hunt | 82bb089 | 2011-07-21 22:01:12 +0000 | [diff] [blame] | 6 | |
| 7 | const bool swchar = (wchar_t)-1 > (wchar_t)0; |
| 8 | |
Alexis Hunt | 82bb089 | 2011-07-21 22:01:12 +0000 | [diff] [blame] | 9 | int max_test[WCHAR_MAX == (swchar ? -(WCHAR_MIN+1) : (wchar_t)-1)]; |
| 10 | int min_test[WCHAR_MIN == (swchar ? 0 : -WCHAR_MAX-1)]; |