summaryrefslogtreecommitdiffstats
path: root/contrib
diff options
context:
space:
mode:
authordas <das@FreeBSD.org>2009-03-25 05:10:32 +0000
committerdas <das@FreeBSD.org>2009-03-25 05:10:32 +0000
commitb02644481a13e349268514663bb6f71f26e995b2 (patch)
tree6d5dc77c91888f6828d8d9ee714938ac2b52462c /contrib
parente4ac427700c0a1d558e3fcefcbb4e5d7d478a6c7 (diff)
downloadFreeBSD-src-b02644481a13e349268514663bb6f71f26e995b2.zip
FreeBSD-src-b02644481a13e349268514663bb6f71f26e995b2.tar.gz
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
Diffstat (limited to 'contrib')
-rw-r--r--contrib/gcc/c-decl.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/contrib/gcc/c-decl.c b/contrib/gcc/c-decl.c
index 7e4cffc..64a6fa8 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;
OpenPOWER on IntegriCloud