blob: 5245f31d4c385696280e8bb9185b92ec5e59fa26 [file] [log] [blame]
Francois Pichetcb67f612011-07-22 10:49:54 +00001// RUN: %clang_cc1 -ffreestanding -fsyntax-only -verify %s
2// RUN: %clang_cc1 -ffreestanding -fsyntax-only -verify -fshort-wchar %s
Sean Huntf818a8b2011-07-21 22:01:12 +00003
Eric Christophere02e5e22011-09-08 23:25:25 +00004#include <stdint.h>
Sean Huntf818a8b2011-07-21 22:01:12 +00005
6const bool swchar = (wchar_t)-1 > (wchar_t)0;
7
8#ifdef __WCHAR_UNSIGNED__
9int signed_test[!swchar];
10#else
11int signed_test[swchar];
12#endif
13
14int max_test[WCHAR_MAX == (swchar ? -(WCHAR_MIN+1) : (wchar_t)-1)];
15int min_test[WCHAR_MIN == (swchar ? 0 : -WCHAR_MAX-1)];