Sign in
gnu
/
gcc
/
ab810952eb7c061e37054ddd1dfe0aa033365131
/
.
/
gcc
/
testsuite
/
g++.dg
/
conversion
/
enum1.C
blob: 6ea8cadb64293e30c594cfb8c167e9abe249f536 [
file
] [
log
] [
blame
]
// { dg-do run }
// { dg-options "-O2 -finline-functions" }
enum
E
{
V
=
1
};
static
const
E E_MIN
=
V
;
static
const
E E_MAX
=
V
;
bool
valid
(
E v
)
{
return
v
>=
E_MIN
&&
v
<=
E_MAX
;
}
int
main
()
{
return
valid
(
E
(
2
));
}