repo.or.cz
/
gcc.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
Fortran: Fix PR 47485.
[gcc.git]
/
gcc
/
testsuite
/
g++.dg
/
analyzer
/
infinite-recursion-pr63388.C
blob
74af8cad3fffd9abd65bbf45f6c6d04daf59863b
1
// { dg-do compile { target c++11 } }
2
3
namespace std
4
{
5
class ostream;
6
extern ostream cout;
7
}
8
9
enum class Month {jan=1, feb, mar, apr, may, jun, jul, aug, sep, oct, nov, dec};
10
11
std::ostream& operator<<(std::ostream& os, Month m)
12
{
13
return os << m; // { dg-warning "infinite recursion" }
14
}
15
16
int main()
17
{
18
Month m = Month::may;
19
std::cout << m;
20
return 0;
21
}