repo.or.cz
/
gcc.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
[gcn] install.texi: Update for new ISA targets and their requirements
[gcc.git]
/
gcc
/
testsuite
/
g++.dg
/
cpp23
/
charlit-encoding1.C
blob
736f022ea954e3149d9447149886e0325a939718
1
// PR c++/102615 - P2316R2 - Consistent character literal encoding
2
// { dg-do run }
3
4
extern "C" void abort ();
5
6
int
7
main ()
8
{
9
#if ' ' == 0x20
10
if (' ' != 0x20)
11
abort ();
12
#elif ' ' == 0x40
13
if (' ' != 0x40)
14
abort ();
15
#else
16
if (' ' == 0x20 || ' ' == 0x40)
17
abort ();
18
#endif
19
#if 'a' == 0x61
20
if ('a' != 0x61)
21
abort ();
22
#elif 'a' == 0x81
23
if ('a' != 0x81)
24
abort ();
25
#elif 'a' == -0x7F
26
if ('a' != -0x7F)
27
abort ();
28
#else
29
if ('a' == 0x61 || 'a' == 0x81 || 'a' == -0x7F)
30
abort ();
31
#endif
32
return 0;
33
}