Re: arm32 build warnings in workqueue.c

From: Linus Torvalds
Date: Fri Jun 23 2023 - 18:22:46 EST


On Fri, 23 Jun 2023 at 15:15, Linus Torvalds
<torvalds@xxxxxxxxxxxxxxxxxxxx> wrote:
>
> I had to go look at what sparse does, because I didn't think I would
> ever have made it match that crazy gcc behavior.
>
> But it does - because a few years ago Luc added the logic to match
> gcc, and it never triggered me.
>
> Oh, how very horrible.

Yeah, I just went back and checked an older version of sparse - and
that older version actually DTRT, and gave every enum the proper type
(ie in that example I posted, every enum size was 8 bytes).

So even sparse now gets this wrong, because sparse was explicitly made
to match that horrid gcc behavior. I guess we got warnings from
sparse, and then that caused Luc to "fix" sparse and nobody realized
that the warnings were good.

Linus