URL
https://opencores.org/ocsvn/openrisc_2011-10-31/openrisc_2011-10-31/trunk
Subversion Repositories openrisc_2011-10-31
[/] [openrisc/] [trunk/] [gnu-src/] [gcc-4.2.2/] [gcc/] [testsuite/] [g++.old-deja/] [g++.law/] [enum4.C] - Rev 149
Go to most recent revision | Compare with Previous | Blame | View Log
// { dg-do assemble }
// GROUPS passed enums
// enum file
// From: dougm@cs.rice.edu (Doug Moore)
// Date: Thu, 18 Mar 93 00:14:57 CST
// Subject: 2.3.3:Inconsistent behavior for enum conversions
// Message-ID: <9303180614.AA12123@cs.rice.edu>
enum Enum {enumerator1, enumerator2};
struct Struct
{
int i;
int getI(Enum) {return i;} // { dg-error "" } candidates
};
int funct (Enum)
{
return 0;
}
int main()
{
Enum e = enumerator1;
Struct s;
int x = funct(e+1);// { dg-error "" } .*
int y = s.getI(e+1);// { dg-error "" } .*
return x+y;
}
Go to most recent revision | Compare with Previous | Blame | View Log