OSDN Git Service

PR c++/51406
[pf3gnuchains/gcc-fork.git] / gcc / testsuite / g++.dg / cpp0x / enum17.C
1 // PR c++/48536
2 // { dg-options "-std=c++0x -pedantic-errors" }
3
4 #include <climits>
5
6 // According to C++11 / Clause 7.2/5 the following enumeration is
7 // well-formed.  It is also well-formed in C++03 if UINT_MAX < ULONG_MAX,
8 // but C++11 adds long long.
9
10 enum Enum_Inc  { EI_1=UINT_MAX, EI_2 }; // #1
11
12 // It is not equivalent to the following.
13 enum Enum_Inc2 { FI_1=UINT_MAX, FI_2=FI_1+1 }; // #2
14
15 #define SA(X) static_assert(X,#X)
16 SA (EI_2 != 0);
17 SA (FI_2 == 0);