| 1 |
/* Undefined nested function should be a error, whether or not the |
| 2 |
function is called. Bug 17807. */ |
| 3 |
/* Origin: Joseph Myers <[email protected]> */ |
| 4 |
/* { dg-do compile } */ |
| 5 |
/* { dg-options "" } */ |
| 6 |
|
| 7 |
void |
| 8 |
f (void) |
| 9 |
{ |
| 10 |
auto int fn (int); /* { dg-error "nested function 'fn' declared but never defined" } */ |
| 11 |
auto int fn2 (int); /* { dg-error "nested function 'fn2' declared but never defined" } */ |
| 12 |
sizeof(fn(1)); |
| 13 |
} |
| 14 |
|
| 15 |
void |
| 16 |
h (void) |
| 17 |
{ |
| 18 |
auto int hn (int); /* { dg-error "nested function 'hn' declared but never defined" } */ |
| 19 |
hn (1); |
| 20 |
} |