aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/cpp/if-2.c
blob: 4b9d28821adb223cc205119cd62a564452a48d6a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
/* { dg-do preprocess } */
/* { dg-options -pedantic-errors } */

#if 'a' != 'a' || '\001' != 1 || '\x12' != 0x12
#error a,1,0x12 /* { dg-bogus "#error" "basic charconst recognition" } */
#endif

#if 'a' != L'a'
#error L'a'	/* { dg-bogus "error" "wide charconst recognition 1" } */
#endif

#if L'\xfeed' != 0xfeed
#error 0xfeed	/* { dg-bogus "error" "wide charconst recognition 2" } */
#endif

#if L'\x1234' != 0x1234
#error 0xfeed	/* { dg-bogus "error" "wide charconst recognition 2" } */
#endif

#if 'abcd' /* { dg-warning "multi-character character constant" "multi-character charconst" } */
#endif

#if 'abcdefghi' /* { dg-error "character constant (is )?too long" "charconst too long" } */
#endif

#if '' /* { dg-error "empty character constant" "empty charconst" } */
#endif