From e4c3a7fc88f7466a228104f3c43ef5f494295e95 Mon Sep 17 00:00:00 2001 From: David Schultz Date: Wed, 25 Mar 2009 05:10:32 +0000 Subject: [PATCH] Merge an important change that I mistakenly left out when merging C99 inline function support. This should fix instances where gcc spuriously reports the following error: error: nested function 'foo' declared but never defined --- contrib/gcc/c-decl.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/contrib/gcc/c-decl.c b/contrib/gcc/c-decl.c index 7e4cffc7ae9..64a6fa8fb85 100644 --- a/contrib/gcc/c-decl.c +++ b/contrib/gcc/c-decl.c @@ -798,7 +798,9 @@ pop_scope (void) && DECL_ABSTRACT_ORIGIN (p) != p) TREE_ADDRESSABLE (DECL_ABSTRACT_ORIGIN (p)) = 1; if (!DECL_EXTERNAL (p) - && DECL_INITIAL (p) == 0) + && DECL_INITIAL (p) == 0 + && scope != file_scope + && scope != external_scope) { error ("nested function %q+D declared but never defined", p); undef_nested_function = true;