Sign in
gnu
/
gcc
/
1f16a020acbea0af26209478990b83b1a1ba3a2b
/
.
/
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
));
}