This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c/12738] Missing function with 'static' block-scope declaration; unit-at-a-time; and IMA.
- From: "wilson at specifixinc dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 31 Oct 2003 01:39:33 -0000
- Subject: [Bug c/12738] Missing function with 'static' block-scope declaration; unit-at-a-time; and IMA.
- References: <20031023004550.12738.geoffk@gcc.gnu.org>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12738
------- Additional Comments From wilson at specifixinc dot com 2003-10-31 01:39 -------
Subject: Re: Missing function with 'static' block-scope declaration;
unit-at-a-time; and IMA.
geoffk at geoffk dot org wrote:
> However, I would suggest that we should deprecate this GCC extension.
> At the very least, the warning should be on by default.
I suspect there is an interaction with nested functions here. If you
allow static functions to be defined within a block, and we do, then you
must also allow static declarations of functions within a block.
However, we could give a warning if a block contains a static function
declaration, but no matching nested static function definition. We
would not be able to give this warning until the end of the block, since
the function definition could appear anywhere within the block. (I'm
thinking ISO C99 rules here).