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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [g++.dg/] [cpp0x/] [forw_enum8.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
// { dg-do compile }
2
// { dg-options "-std=c++0x" }
3
 
4
//This instatiation is ok
5
template struct S1
6
{
7
    enum E : int;
8
    enum E : T;
9
};
10
template struct S1; //ok
11
 
12
//This error is diagnosed at instantiation time
13
template struct S2
14
{
15
    enum E : int;   // { dg-error "previous definition" }
16
    enum E : T;     // { dg-error "different underlying type" }
17
};
18
template struct S2; // { dg-message "required from here" }
19
 
20
//This error is diagnosed at compilation time
21
template struct S3
22
{
23
    enum E : int;   // { dg-error "previous definition" }
24
    enum E : short; // { dg-error "different underlying type" }
25
};
26
 

powered by: WebSVN 2.1.0

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