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

Subversion Repositories openrisc

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

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 693 jeremybenn
// { dg-do compile }
2
// { dg-options "-std=c++0x" }
3
 
4
// opaque enum declarations
5
enum class E1;
6
enum class E2 : int;
7
enum class E3 : short;
8
enum E4 : int;
9
enum E5 : short;
10
 
11
// can be repeated
12
enum class E1;
13
enum class E2 : int;
14
enum class E3 : short;
15
enum E4 : int;
16
enum E5 : short;
17
 
18
// are complete so we can declare variables
19
E1 b1;
20
E2 b2;
21
E3 b3;
22
E4 b4;
23
E5 b5;
24
 
25
//even with elaborated-type-specifiers
26
enum E1 a1;
27
enum E2 a2;
28
enum E3 a3;
29
enum E4 a4;
30
enum E5 a5;
31
 
32
// and the list can be added later
33
enum class E1 { e11, e12 };
34
enum class E2 : int { e21, e22 };
35
enum class E3 : short {e31, e32 };
36
enum E4 : int { e41, e42 };
37
enum E5 : short { e51, e52 };
38
 
39
// more repetitions allowed
40
enum class E1;
41
enum class E2 : int;
42
enum class E3 : short;
43
enum E4 : int;
44
enum E5 : short;
45
 

powered by: WebSVN 2.1.0

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