bd52d17906
too large to list, but see: http://gcc.gnu.org/gcc-3.4/changes.html http://gcc.gnu.org/gcc-4.0/changes.html http://gcc.gnu.org/gcc-4.1/changes.html for the details.
21 lines
565 B
C
21 lines
565 B
C
/* Undefined nested function should be a error, whether or not the
|
|
function is called. Bug 17807. */
|
|
/* Origin: Joseph Myers <joseph@codesourcery.com> */
|
|
/* { dg-do compile } */
|
|
/* { dg-options "" } */
|
|
|
|
void
|
|
f (void)
|
|
{
|
|
auto int fn (int); /* { dg-error "error: nested function 'fn' declared but never defined" } */
|
|
auto int fn2 (int); /* { dg-error "error: nested function 'fn2' declared but never defined" } */
|
|
sizeof(fn(1));
|
|
}
|
|
|
|
void
|
|
h (void)
|
|
{
|
|
auto int hn (int); /* { dg-error "error: nested function 'hn' declared but never defined" } */
|
|
hn (1);
|
|
}
|