Debian Codegraph @

gcc/testsuite/gcc.dg/cpp/wchar-1.c

raw
1 /* Copyright (C) 2002 Free Software Foundation, Inc. */
2
3 /* { dg-do run } */
4 /* { dg-options "-w" } */
5
6 /* Source: Neil Booth, 24 Feb 2002.
7
8 Test if compiler and preprocessor agree on signeness of wide
9 chars. */
10
11 int main ()
12 {
13 __WCHAR_TYPE__ c = -1;
14
15 #if L'\x0' - 1 < 0
16 if (c > 0)
17 __builtin_abort ();
18 #else
19 if (c < 0)
20 __builtin_abort ();
21 #endif
22
23 return 0;
24 }