[<prev] [next>] [day] [month] [year] [list]
Message-ID: <Y1EYS/DRjvQd/8t+@localhost.localdomain>
Date: Thu, 20 Oct 2022 12:43:39 +0300
From: Alexey Dobriyan <adobriyan@...il.com>
To: linux-kernel@...r.kernel.org
Cc: mm-commits@...r.kernel.org, torvalds@...ux-foundation.org,
masahiroy@...nel.org, keescook@...omium.org,
gregkh@...uxfoundation.org, andriy.shevchenko@...ux.intel.com,
Jason@...c4.com, akpm@...ux-foundation.org
Subject: Re: + kbuild-treat-char-as-always-unsigned.patch added to
mm-nonmm-unstable branch
On Wed, Oct 19, 2022 at 05:03:55PM -0700, Andrew Morton wrote:
> This will break things in some places and fix things in others, so this
> will likely cause a bit of churn while reconciling the type misuse.
> --- a/Makefile~kbuild-treat-char-as-always-unsigned
> +++ a/Makefile
> @@ -562,7 +562,7 @@ KBUILD_AFLAGS := -D__ASSEMBLY__ -fno-P
> KBUILD_CFLAGS := -Wall -Wundef -Werror=strict-prototypes -Wno-trigraphs \
> -fno-strict-aliasing -fno-common -fshort-wchar -fno-PIE \
> -Werror=implicit-function-declaration -Werror=implicit-int \
> - -Werror=return-type -Wno-format-security \
> + -Werror=return-type -Wno-format-security -funsigned-char \
> -std=gnu11
> KBUILD_CPPFLAGS := -D__KERNEL__
> KBUILD_RUSTFLAGS := $(rust_common_flags) \
ACK
Another reason is that characters were always some small non-negative
integers which mapped to pictures so making them signed was silly from
the beginning.
People should use "const char *" for C strings and "u8[]" for raw buffers.
Unfortunately, C can't give developer more.
Powered by blists - more mailing lists