This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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>


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]