Sign in
gnu
/
gcc
/
ab810952eb7c061e37054ddd1dfe0aa033365131
/
.
/
gcc
/
testsuite
/
g++.dg
/
other
/
operator4.C
blob: e7a41c01a58c1647df4261ec9a1843cc3953e443 [
file
] [
log
] [
blame
]
// PR c++/91819 - ICE with operator++ and enum.
// { dg-do compile }
enum
Foo
{
a
,
b
};
inline
Foo
operator
++(
Foo
&
f
,
int
)
{
return
f
=
(
Foo
)(
f
+
1
);
}
int
main
()
{
int
count
=
0
;
for
(
Foo
f
=
a
;
f
<=
b
;
f
++)
{
count
++;
}
return
count
;
}