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
Daily bump.
[gcc.git]
/
gcc
/
testsuite
/
g++.dg
/
warn
/
ref-temp1.C
blob
b09d9215310d6ca8f86a177592ffe23561096271
1
// PR c++/986
2
// { dg-options "-Wall -Wextra" }
3
4
struct X { X (int); };
5
6
struct Y {
7
Y ();
8
const X &x; // note the ampersand
9
};
10
11
Y::Y () : x(1) {} // { dg-warning "temporary" }
12
13
/* The initialization of x with the temporary might also trigger:
14
{ dg-prune-output "-Wdangling-pointer" } */