re PR c/17807 (No warning/error for undefined local function.)
authorJoseph Myers <joseph@codesourcery.com>
Thu, 3 Feb 2005 02:21:10 +0000 (02:21 +0000)
committerJoseph Myers <jsm28@gcc.gnu.org>
Thu, 3 Feb 2005 02:21:10 +0000 (02:21 +0000)
commit73aea290cc5417e4025eb92d95afaf1eeab73631
tree364e34ebace79fcfdc6374fb770c5ba7d7e4e33e
parent1f732f61ea2ac643e30b8068ee3f6737f07de271
re PR c/17807 (No warning/error for undefined local function.)

PR c/17807
* c-decl.c (undef_nested_function): New variable.
(pop_scope): Diagnose undefined nested functions.
(finish_function): Don't attempt cgraph processing or genericizing
if current top-level function contained an undefined nested
function.  Reset undef_nested_function at the end of a top-level
function.

testsuite:
* gcc.dg/nested-func-3.c: New test.
* gcc.dg/pr18596-3.c: Expect error for undefined nested function.

From-SVN: r94645
gcc/ChangeLog
gcc/c-decl.c
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/nested-func-3.c [new file with mode: 0644]
gcc/testsuite/gcc.dg/pr18596-3.c