Geoff Johnstone wrote: >>> I've attached four patches that I've written for sparse to >>> use it for a userland project. 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'd love to apply an updated version with those two changes. Regarding incomplete structs, your patch seems reasonable as far as I know, and it doesn't break the test suite, so I've applied and pushed it. Per your concerns, if this patch doesn't represent the correct fix, the code can change later when we have a test case that breaks with this patch. Please do consider writing a patch for a new test case based on your example. Your argument parsing for -ansi and -std= looks great to me. Applied and pushed. The new builtins for fortify handling seem fine. Applied and pushed. Thanks for your patches. - Josh Triplett
Attachment:
signature.asc
Description: OpenPGP digital signature