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
/
warn
/
Wdangling-reference23.C
blob
e59ccc5057bb881690ecf4438e800428a4431093
1
// PR c++/115361
2
// { dg-additional-options -Wdangling-reference }
3
4
struct B { int i; };
5
6
struct A {
7
const int & operator()(const B& b) { return b.i; }
8
};
9
10
int main()
11
{
12
B b = {};
13
const int &r = A()(b);
14
}