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]

Re: Patch to warn about non-static declaration follows static one


>>>>> "Kaveh" == Kaveh R Ghazi <ghazi@caip.rutgers.edu> writes:

    Kaveh> 	Although it is perhaps legal, a non-static decl
    Kaveh> following a static one isn't portable.  So I thought I'd
    Kaveh> make gcc warn about it like it already does for the
    Kaveh> opposite type of mismatch.

This should only be done at some extreme level of warning paranoia.
It's perfectly legal to omit the `static' despite the protestations of
some antiquated K&R compilers, and this warning will result in a *lot*
of noise on perfectly OK code.

-- 
Mark Mitchell 			mark@markmitchell.com
Mark Mitchell Consulting	http://www.markmitchell.com


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