This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Abolish 'static' functions in local scope
- From: "Joseph S. Myers" <jsm at polyomino dot org dot uk>
- To: Geoffrey Keating <gkeating at apple dot com>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Mon, 30 Aug 2004 22:27:03 +0000 (UTC)
- Subject: Re: Abolish 'static' functions in local scope
- References: <20040830221341.991ABCD180A@geoffk5.apple.com>
On Mon, 30 Aug 2004, Geoffrey Keating wrote:
> * c-decl.c (grokdeclarator): Produce error for 'static' on local
> function declaration.
There's more cleanup possible (at least the code in pushdecl that checks
for this case, and some bits of diagnose_mismatched_decls, provided you
get rid of the static so that subsequent processing of invalid code
doesn't need to care for that case).
> --- /dev/null 1 Jan 1970 00:00:00 -0000
> +++ testsuite/gcc.dg/funcdef-storage-1.c 30 Aug 2004 21:57:30 -0000
> @@ -0,0 +1,14 @@
> +/* { dg-do compile } */
> +
This test needs { dg-options "" }, otherwise it gets the default -ansi
-pedantic-errors and so tests nothing about the patch.
--
Joseph S. Myers http://www.srcf.ucam.org/~jsm28/gcc/
http://www.srcf.ucam.org/~jsm28/gcc/#c90status - status of C90 for GCC 3.5
jsm@polyomino.org.uk (personal mail)
jsm28@gcc.gnu.org (Bugzilla assignments and CCs)