This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
patch for 'static' inside functions
- From: Geoff Keating <geoffk at apple dot com>
- To: gcc-patches at gcc dot gnu dot org
- Date: Thu, 23 Oct 2003 12:22:52 -0700
- Subject: patch for 'static' inside functions
This is the actual patch (for the 3.3 compiler).
OK?
*** c-decl.c.~1.124.2.13.~ Wed Oct 15 23:18:12 2003
--- c-decl.c Thu Oct 23 11:02:47 2003
***************
*** 5156,5163 ****
Storage classes other than `extern' are not allowed
and `extern' makes no difference. */
if (current_binding_level != global_binding_level
! && (specbits & ((1 << (int) RID_STATIC) | (1 << (int)
RID_INLINE)))
! && pedantic)
pedwarn ("invalid storage class for function `%s'", name);
decl = build_decl (FUNCTION_DECL, declarator, type);
--- 5156,5164 ----
Storage classes other than `extern' are not allowed
and `extern' makes no difference. */
if (current_binding_level != global_binding_level
! /* APPLE LOCAL IMI */
! && (specbits
! & ((1 << (int) RID_STATIC) | (1 << (int) RID_INLINE))))
pedwarn ("invalid storage class for function `%s'", name);
decl = build_decl (FUNCTION_DECL, declarator, type);
--
Geoff Keating <geoffk@apple.com>