1 /* Copyright (C) 2001 Free Software Foundation, Inc. */
4 /* { dg-options -Wno-multichar } */
6 /* This tests values and signedness of multichar charconsts.
8 Neil Booth, 5 May 2002. */
12 extern void abort (void);
16 /* These tests require at least 2-byte ints. 8-) */
18 int scale
= (int) (unsigned char) -1 + 1;
20 if ('ab' != (int) ((unsigned char) 'a' * scale
+ (unsigned char) 'b'))
23 if ('\234b' != (int) ((unsigned char) '\234' * scale
+ (unsigned char) 'b'))
26 if ('b\234' != (int) ((unsigned char) 'b' * scale
+ (unsigned char) '\234'))
28 /* Multichar charconsts have type int and should be signed. */
31 # error Preprocessor charconsts 1
35 #elif INT_MAX == 2147483647
37 # error Preprocessor charconsts 2
41 #elif INT_MAX == 9223372036854775807
42 # if '\234aaaaaaa' > 0
43 # error Preprocessor charconsts 3
45 if ('\234aaaaaaa' > 0)