sparse on MinGW
Get series with b4
b4 am [email protected]Versions newest first
- v1 Latest5 patches 17 repliesIn review
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/5 | Add the __restrict__ keywordident-list.h parse.c validation/ | +4 | 1 reply | |
| 2/5 | Add support for the MinGW platformcgcc | +13 | 4 replies | |
| 3/5 | Fix some "unknown format" warningscompile-i386.c example.c expand.c +6 more | +43 | 6 replies | |
| 4/5 | test-suite: Add -b option to ignore CR at eol on MinGWvalidation/ | +1 | 4 replies | |
| 5/5 | lib.c: Add __sync_lock_test_and_set as a builtin functionlib.c | +1 | 2 replies |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.
Cover letter [PATCH 0/5] sparse on MinGW
Hi Chris,
As I mentioned before, I ported sparse to MinGW four years ago, but have not posted the patches here yet because they need some "tidy up" work.
Well, I still haven't done the tidy-up, but I have decided to post them anyway! :-D
Actually, only the first four patches are really about porting to MinGW; the final patch just happens to fix a problem while running sparse over git on MinGW (compat/nedmalloc/nedmalloc.c to be precise).
Patch #1 adds the __restrict__ keyword, which is used often in the system headers.
Patch #2 actually adds support for MinGW to cgcc. Note that this only adds support for 32-bit systems. I don't have access to a 64-bit system, but I suspect this would require additional changes to support 64-bit.
Patch #3 fixes all of the compilation errors/warnings. This is mostly fixing up "format specifiers" (e.g. "%llx") which gcc on MinGW does not understand. Fixing the format specifiers involves using the macros in the <inttypes.h> header file. However, this patch addresses other issues, which are mostly marked by the use of "#if !defined(__MINGW32__)" conditional blocks, and is the reason for not submitting earlier.
Patch #4 allows the test-suite to run on MinGW. [The original version of these patches actually used calls to _setmode() to set _O_BINARY mode for stdout and stderr so that sparse output used LF line endings, rather than CRLF.]
ATB,
Ramsay Jones
Ramsay Jones (5):
Add the __restrict__ keyword
Add support for the MinGW platform
Fix some "unknown format" warnings
test-suite: Add -b option to ignore CR at eol on MinGW lib.c: Add __sync_lock_test_and_set as a builtin function
cgcc | 13 +++++++++++++ compile-i386.c | 7 ++++--- example.c | 7 ++++--- expand.c | 5 +++-- ident-list.h | 2 +- lib.c | 1 + linearize.c | 15 ++++++++++----- parse.c | 6 ++++-- pre-process.c | 7 ++++++- show-parse.c | 15 ++++++++++----- sparse.c | 3 ++- tokenize.c | 4 ++-- validation/reserved.c | 1 + validation/test-suite | 2 +- 14 files changed, 62 insertions(+), 26 deletions(-)
Signature · 1 line
1.8.2