| 1 |
// PR C++/66590 |
| 2 |
// { dg-do compile } |
| 3 |
// { dg-options "-Wall" } |
| 4 |
|
| 5 |
struct A{ ~A();}; |
| 6 |
|
| 7 |
int f(int x) |
| 8 |
{ |
| 9 |
A a; |
| 10 |
switch (x) |
| 11 |
{ |
| 12 |
case 1: { A tmp; return 1; } break; |
| 13 |
default: return 0; |
| 14 |
} |
| 15 |
} // { dg-bogus "control reaches end of non-void function" } |