On Fri, Nov 22, 2019 at 11:16:58PM +0100, Luc Van Oostenryck wrote: > On Fri, Nov 22, 2019 at 04:23:27PM +0000, Ramsay Jones wrote: > > > So, sparse (with this patch applied) gets it: > > > > $ ./sparse junk.c > > junk.c:7:6: error: symbol 'func0' redeclared with different type (originally declared at junk.c:4) - different modifiers > > $ > > > > But gcc, not so much: > > > > $ gcc -c junk.c > > $ gcc -Wall -c junk.c > > $ gcc -Wall -Wextra -c junk.c > > junk.c: In function ‘func0’: > > junk.c:7:16: warning: unused parameter ‘a’ [-Wunused-parameter] > > void func0(int a) > > ^ > > $ > > > > So, I don't know ... [...] > A priori, though, it seems to me that simply ignoring these function > attributes when checking the declaration/definition compatibility, > like it was done in the previous patch, is inferior. > I'll need to think a bit more about all this. I'll push this version. I think it's quite sane, better than the current situation and it's normal for sparse to be more picky than GCC about these things. Best regards, -- Luc