comparison gcc/testsuite/gcc.dg/nested-func-3.c @ 111:04ced10e8804

gcc 7
author kono
date Fri, 27 Oct 2017 22:46:09 +0900
parents
children
comparison
equal deleted inserted replaced
68:561a7518be6b 111:04ced10e8804
1 /* Undefined nested function should be a error, whether or not the
2 function is called. Bug 17807. */
3 /* Origin: Joseph Myers <joseph@codesourcery.com> */
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 }