Mercurial > hg > CbC > CbC_gcc
comparison gcc/testsuite/gcc.dg/cpp/pr23827_c99.c @ 111:04ced10e8804
gcc 7
author | kono |
---|---|
date | Fri, 27 Oct 2017 22:46:09 +0900 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
68:561a7518be6b | 111:04ced10e8804 |
---|---|
1 /* { dg-do run { target c++11 } } */ | |
2 /* { dg-options "-pedantic-errors" } */ | |
3 | |
4 #define f ( | |
5 #define l ) | |
6 #define str(x) #x | |
7 #define xstr(x) str(x) | |
8 | |
9 /* C90 and C++98: "0x1p+( 0x1p+)" */ | |
10 /* C99 and C++11: "0x1p+f 0x1p+l" */ | |
11 const char *s = xstr(0x1p+f 0x1p+l); | |
12 | |
13 void abort (void); | |
14 int strcmp (const char *, const char *); | |
15 | |
16 int | |
17 main() | |
18 { | |
19 if (strcmp (s, "0x1p+( 0x1p+)")) | |
20 return 0; /* Correct C99 and C++11 behavior. */ | |
21 else | |
22 abort (); /* Correct C90 and C++ behavior. */ | |
23 } |