Mercurial > hg > CbC > CbC_gcc
view gcc/testsuite/g++.dg/cpp0x/enum17.C @ 131:84e7813d76e9
gcc-8.2
author | mir3636 |
---|---|
date | Thu, 25 Oct 2018 07:37:49 +0900 |
parents | 04ced10e8804 |
children |
line wrap: on
line source
// PR c++/48536 // { dg-do compile { target c++11 } } #include <climits> // According to C++11 / Clause 7.2/5 the following enumeration is // well-formed. It is also well-formed in C++03 if UINT_MAX < ULONG_MAX, // but C++11 adds long long. enum Enum_Inc { EI_1=UINT_MAX, EI_2 }; // #1 // It is not equivalent to the following. enum Enum_Inc2 { FI_1=UINT_MAX, FI_2=FI_1+1 }; // #2 #define SA(X) static_assert(X,#X) SA (EI_2 != 0); SA (FI_2 == 0);