Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 25 Mar 2009 05:10:33 +0000 (UTC)
From:      David Schultz <das@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r190404 - head/contrib/gcc
Message-ID:  <200903250510.n2P5AXgD066389@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: das
Date: Wed Mar 25 05:10:32 2009
New Revision: 190404
URL: http://svn.freebsd.org/changeset/base/190404

Log:
  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

Modified:
  head/contrib/gcc/c-decl.c

Modified: head/contrib/gcc/c-decl.c
==============================================================================
--- head/contrib/gcc/c-decl.c	Wed Mar 25 03:42:49 2009	(r190403)
+++ head/contrib/gcc/c-decl.c	Wed Mar 25 05:10:32 2009	(r190404)
@@ -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;



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200903250510.n2P5AXgD066389>