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