OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [g++.dg/] [cpp0x/] [enum17.C] - Blame information for rev 774

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 693 jeremybenn
// PR c++/48536
2
// { dg-options "-std=c++0x -pedantic-errors" }
3
 
4
#include 
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);

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.