Re: [PATCH] m32r: set CHECKFLAGS properly

Kyle Moffett
2005-09-27T18:37:45Z

On Sep 27, 2005, at 13:55:26, Al Viro wrote:
> On Tue, Sep 27, 2005 at 01:31:25PM -0400, Kyle Moffett wrote:
>> Why not? Some of that stuff may get used in kernel headers, which
>> sparse should definitely have defined. Besides, sparse is
>> designed to check C source code, which will be compiled with said
>> GCC using those preprocessing defines. Why should it use a
>> different set of defines?
>
> First of all, some of that stuff should not be used in kernel
> headers and getting a warning about such uses is a Good Thing(tm).
> What's more, some are actively *wrong* for kernel -
> __STDC_HOSTED__, for one, is simply a lie.

So maybe put a "grep" in the middle to select the ones you want or
"grep -v" to remove the ones you don't? I don't see why this is such
a big deal. There are obviously missing defines that sparse needs to
correctly operate with kernel headers, and I'm not sure why we should
specify them in several places in the Makefiles, including one set
for each arch.?

> And no, sparse (or any other C compiler) is not required to have
> the same pile as gcc does.

But when we're using sparse to check kernel sources, it should have a
similar set to what the regular compiler (IE: gcc) has when building
kernel sources.

Cheers,
Kyle Moffett

--
Debugging is twice as hard as writing the code in the first place.
Therefore, if you write the code as cleverly as possible, you are, by
definition, not smart enough to debug it.
-- Brian Kernighan