Re: four sparse patches

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



>  Regarding Wmix-decl-code.diff, I agree that that warning definitely
>  needs an option controlling it. but GCC already has that option and
>  calls it "-Wdeclaration-after-statement", so matching GCC's name
>  seems potentially useful. (However, I can imagine corner cases
>  where it might prove problematic, such as wanting to pass that
>  option to GCC and not Sparse or vice versa.) Also, I agree that the
>  default should depend on the C standard in use, and I see no
>  compatibility reason why the warning should remain for code that
>  explicitly asks for C99.  Thus, I haven't applied this version of
>  the patch.

I've attached a revised version of the patch that:
 - Renames the option to -Wdeclaration-after-statement, as per GCC
   (wasn't hitherto aware of that gcc option).
 - Defaults based on chosen C dialect.
 - Adds a few tests. (I'll do a separate patch for tests for the
   incomplete struct patch.)
 - Was made wrt the git trunk at about 11:30 UTC on 12th April.

Geoff.

Attachment: Wdeclaration-after-statement.diff
Description: Binary data


[Index of Archives]     [Newbies FAQ]     [LKML]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Trinity Fuzzer Tool]

  Powered by Linux