annotate gcc/testsuite/gcc.dg/cpp/pr23827_c99.c @ 132:d34655255c78

update gcc-8.2
author mir3636
date Thu, 25 Oct 2018 10:21:07 +0900
parents 04ced10e8804
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
111
kono
parents:
diff changeset
1 /* { dg-do run { target c++11 } } */
kono
parents:
diff changeset
2 /* { dg-options "-pedantic-errors" } */
kono
parents:
diff changeset
3
kono
parents:
diff changeset
4 #define f (
kono
parents:
diff changeset
5 #define l )
kono
parents:
diff changeset
6 #define str(x) #x
kono
parents:
diff changeset
7 #define xstr(x) str(x)
kono
parents:
diff changeset
8
kono
parents:
diff changeset
9 /* C90 and C++98: "0x1p+( 0x1p+)" */
kono
parents:
diff changeset
10 /* C99 and C++11: "0x1p+f 0x1p+l" */
kono
parents:
diff changeset
11 const char *s = xstr(0x1p+f 0x1p+l);
kono
parents:
diff changeset
12
kono
parents:
diff changeset
13 void abort (void);
kono
parents:
diff changeset
14 int strcmp (const char *, const char *);
kono
parents:
diff changeset
15
kono
parents:
diff changeset
16 int
kono
parents:
diff changeset
17 main()
kono
parents:
diff changeset
18 {
kono
parents:
diff changeset
19 if (strcmp (s, "0x1p+( 0x1p+)"))
kono
parents:
diff changeset
20 return 0; /* Correct C99 and C++11 behavior. */
kono
parents:
diff changeset
21 else
kono
parents:
diff changeset
22 abort (); /* Correct C90 and C++ behavior. */
kono
parents:
diff changeset
23 }