OSDN Git Service

PR c/17807
authorjsm28 <jsm28@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 3 Feb 2005 02:21:10 +0000 (02:21 +0000)
committerjsm28 <jsm28@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 3 Feb 2005 02:21:10 +0000 (02:21 +0000)
commit8a1f0315c246ca27860bbd84533c5a3402e4b2d3
tree364e34ebace79fcfdc6374fb770c5ba7d7e4e33e
parent586a72223a38c9e5d6532b75e1219bc790140326
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.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@94645 138bc75d-0d04-0410-961f-82ee72b054a4
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