Message ID | 53dc6269-3884-ab48-94bb-550718e4e3ce@ramsayjones.plus.com (mailing list archive) |
---|---|
Headers | show |
Series | misc sparse patches | expand |
On Mon, Nov 19, 2018 at 08:44:37PM +0000, Ramsay Jones wrote: > > Hi Luc, > > I noticed a couple of days ago, that the git.kernel.org sparse repo had > suddenly 'fast-forwarded' to just two commits behind the master branch > of your github sparse.git repo. As I mentioned before, I have been using > that branch as a base for my own patches (so that I don't suffer the > 'sysmacros' warnings on newer versions of Linux). Tonight, I noticed > that it has 'fast-forwarded' again and is now at the same commit as the > base for my patches. So, I thought I may as well send these along ... > :-D Ahh, great! > Some brief notes about the patches: > > 0001-sparsec-use-a-compatible-exception-model-on-cygwin.patch > 0002-sparsei-add-the-no-jit-options.patch > > The first two patches fix the use of the llvm tools on cygwin. The test > suite had 64 test failures (55 + additional 9 fixed by these patches). > The test suite now runs clean. I'm not sure to understand what's the difference between the 55 and the 9 additional ones. I quickly looked at these 2 patches and they looks good (they can't regress on non-cygwin and obviosuly solve the problmes you had). > 0003-pre-process-suppress-trailing-space-when-dumping-mac.patch > 0004-pre-process-print-macros-containing-and-correctly.patch > 0005-pre-process-don-t-put-spaces-in-macro-parameter-list.patch > 0006-pre-process-print-variable-argument-macros-correctly.patch > 0007-pre-process-add-the-dM-option-to-dump-macro-definiti.patch > > These patches implement '-dM' for sparse, just so that I could run: It's nice to upport for -DM (I had a vague intention to add it but it was very low priority). The small fixes/enhancements are much welcome too. > 0008-pre-processor-add-some-pre-defined-macros.patch > > ... this patch! This patch is not 'finished', but has enough to get > started with (eg cygwin has a 16-bit wchar_t, etc). For example, on > cygwin, sparse would spew approx. 1600 warnings on git, without using > the SPARSE_FLAGS in the config.mak file to set the following: > > $ grep SPARSE_FLAGS config.mak > #SPARSE_FLAGS += -D__INTPTR_TYPE__='long int' > #SPARSE_FLAGS += -D__INT32_TYPE__=int > #SPARSE_FLAGS += -D__INT32_MAX__=2147483647 > #SPARSE_FLAGS += -D__UINT32_TYPE__='unsigned int' > #SPARSE_FLAGS += -D__UINT32_MAX__=4294967295U > #SPARSE_FLAGS += -D__INT64_TYPE__='long int' > #SPARSE_FLAGS += -D__INT64_MAX__=9223372036854775807L > #SPARSE_FLAGS += -D__UINT64_TYPE__='long unsigned int' > #SPARSE_FLAGS += -D__UINT64_MAX__=18446744073709551615UL > #SPARSE_FLAGS += -D__INTMAX_TYPE__='long int' > #SPARSE_FLAGS += -D__INTMAX_MAX__=9223372036854775807L > #SPARSE_FLAGS += -D__UINTMAX_TYPE__='long unsigned int' > #SPARSE_FLAGS += -D__UINTMAX_MAX__=18446744073709551615UL > #SPARSE_FLAGS += -D__SIZE_TYPE__='long unsigned int' > #SPARSE_FLAGS += -D__SIZE_MAX__=18446744073709551615UL > $ I see. That looks quite painful. > After this patch, as you can see, I can comment them out (and remove > them once this patch lands). Also, the 'selfcheck' used to complain > about being 'unable to determine type definition of intptr_t' and > 'int32_t'. Excellent! > 0009-constant-add-Wconstant-size-warning.patch > > This is the RFC patch. The main (but not only) problem with this patch > is the name of the warning 'constant-size'! ;-) Please take that as > simply a placeholder for a more appropriate name (whatever that is!). OK, we'll see this. Thanks for these patches. Kind regards, -- Luc
On 19/11/2018 23:59, Luc Van Oostenryck wrote: > On Mon, Nov 19, 2018 at 08:44:37PM +0000, Ramsay Jones wrote: >> >> Some brief notes about the patches: >> >> 0001-sparsec-use-a-compatible-exception-model-on-cygwin.patch >> 0002-sparsei-add-the-no-jit-options.patch >> >> The first two patches fix the use of the llvm tools on cygwin. The test >> suite had 64 test failures (55 + additional 9 fixed by these patches). >> The test suite now runs clean. > > I'm not sure to understand what's the difference between the 55 and > the 9 additional ones. When these patches were written, only 3 'additional test failures' were caused by the problems addressed by these patches (backend tests). Since then, many more backend tests have been written: $ make check Makefile:124: Your system does not have libxml, disabling c2xml Makefile:146: Your system does not have gtk3/gtk2, disabling test-inspect TEST __func__ (__func__.c) TEST abi-integer (abi-integer.c) ... TEST warn-unknown-attribute-yes (Wunknown-attribute-yes.c) KO: out of 608 tests, 544 passed, 64 failed 55 of them are known to fail make: *** [Makefile:228: check] Error 1 $ So, the 55 are those marked 'known to fail' the 9 (64 - 55) other test failures are fixed by these patches. A test suite run now looks like: $ make check Makefile:124: Your system does not have libxml, disabling c2xml Makefile:146: Your system does not have gtk3/gtk2, disabling test-inspect TEST __func__ (__func__.c) TEST abi-integer (abi-integer.c) ... TEST warn-unknown-attribute-yes (Wunknown-attribute-yes.c) OK: out of 611 tests, 556 passed, 55 failed 55 of them are known to fail $ ATB, Ramsay Jones
On Tue, Nov 20, 2018 at 12:36:38AM +0000, Ramsay Jones wrote: > > > On 19/11/2018 23:59, Luc Van Oostenryck wrote: > > On Mon, Nov 19, 2018 at 08:44:37PM +0000, Ramsay Jones wrote: > >> > >> Some brief notes about the patches: > >> > >> 0001-sparsec-use-a-compatible-exception-model-on-cygwin.patch > >> 0002-sparsei-add-the-no-jit-options.patch > >> > >> The first two patches fix the use of the llvm tools on cygwin. The test > >> suite had 64 test failures (55 + additional 9 fixed by these patches). > >> The test suite now runs clean. > > > > I'm not sure to understand what's the difference between the 55 and > > the 9 additional ones. > > When these patches were written, only 3 'additional test failures' > were caused by the problems addressed by these patches (backend tests). > Since then, many more backend tests have been written: > > $ make check > Makefile:124: Your system does not have libxml, disabling c2xml > Makefile:146: Your system does not have gtk3/gtk2, disabling test-inspect > TEST __func__ (__func__.c) > TEST abi-integer (abi-integer.c) > ... > > TEST warn-unknown-attribute-yes (Wunknown-attribute-yes.c) > KO: out of 608 tests, 544 passed, 64 failed > 55 of them are known to fail > make: *** [Makefile:228: check] Error 1 > $ > > So, the 55 are those marked 'known to fail' the 9 (64 - 55) other > test failures are fixed by these patches. Ah yes, OK. Thanks, -- Luc
On Mon, Nov 19, 2018 at 08:44:37PM +0000, Ramsay Jones wrote: > > 0009-constant-add-Wconstant-size-warning.patch > > This is the RFC patch. The main (but not only) problem with this patch > is the name of the warning 'constant-size'! ;-) Please take that as > simply a placeholder for a more appropriate name (whatever that is!). It looks good to me. Maybe '-Wstrict-constant-type' for the name? (I see the original warning more as a type problem than as a size problem). Best regards, -- Luc