[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAHk-=wiiUo0KOMGbrz2uOq9HzRh9HYXZrOC_CzwQRQ5AE5V7cw@mail.gmail.com>
Date: Fri, 23 Jun 2023 12:42:35 -0700
From: Linus Torvalds <torvalds@...ux-foundation.org>
To: Arnd Bergmann <arnd@...db.de>
Cc: Dave Airlie <airlied@...il.com>,
Nathan Chancellor <nathan@...nel.org>,
Nick Desaulniers <ndesaulniers@...gle.com>,
Tejun Heo <tj@...nel.org>, LKML <linux-kernel@...r.kernel.org>
Subject: Re: arm32 build warnings in workqueue.c
On Fri, 23 Jun 2023 at 12:22, Arnd Bergmann <arnd@...db.de> wrote:
>
> The short explanation of the change is that with the previous
> gcc and clang behavior, the type of 'enum foo' would be determined
> separately from the type of each individual constant, while the
> new behavior in gcc-13 makes them all have the same type.
Oh, I actually thought that gcc already did the new behavior long ago.
It's the only sane one. Enums should all have the same type, that's
the whole point of it.
But it explains why the warning only showed up on 32-bit, where the
enum presumably ended up as 'long long', which is the same size as a
pointer on 64-bit (so no complaint), but not on 32-bit.
Anyway, our kernel code was disgusting, and apparently relied on that
horrendously wrong model of enum types.
Linus
Powered by blists - more mailing lists