[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20250804190434.1b9f7535@pumpkin>
Date: Mon, 4 Aug 2025 19:04:34 +0100
From: David Laight <david.laight.linux@...il.com>
To: "Arnd Bergmann" <arnd@...db.de>
Cc: "Thomas Huth" <thuth@...hat.com>, "John Paul Adrian Glaubitz"
<glaubitz@...sik.fu-berlin.de>, linux-kernel@...r.kernel.org, Linux-Arch
<linux-arch@...r.kernel.org>, "David S . Miller" <davem@...emloft.net>,
"Andreas Larsson" <andreas@...sler.com>, sparclinux@...r.kernel.org
Subject: Re: [PATCH 34/41] sparc: Replace __ASSEMBLY__ with __ASSEMBLER__ in
non-uapi headers
On Mon, 04 Aug 2025 10:00:27 +0200
"Arnd Bergmann" <arnd@...db.de> wrote:
> On Mon, Aug 4, 2025, at 08:01, Thomas Huth wrote:
> > On 03/08/2025 15.33, John Paul Adrian Glaubitz wrote:
>
> >
> > So using -ansi in the kernel sources nowadays sounds wrong to me ... could
> > it be removed?
>
> Probably: I see that sparc changed '-traditional' cpp flag to the '-ansi'
> gcc flag in linux-2.1.88, while the others were still using
> -traditional but just dropped it later.
>
> Most likely the idea at the time was to just no longer use pre-ansi
> preprocessing rather than to exclude gnu extensions.
You also get a change to the integer promotion rules.
K&R C is signedness preserving (so unsigned char -> unsigned int)
whereas ANSI C is value preserving (so unsigned char -> signed int).
Unless, of course 'char' and 'int' are the same size.
David
>
> Arnd
>
Powered by blists - more mailing lists