Thread (37 messages) 37 messages, 17 authors, 2021-05-15

Re: [PATCH] Raise the minimum GCC version to 5.2

From: Arnd Bergmann <arnd@arndb.de>
Date: 2021-05-03 09:58:20
Also in: linux-arm-kernel, linux-kbuild, linux-riscv, linuxppc-dev, lkml

On Mon, May 3, 2021 at 2:44 AM Segher Boessenkool
[off-list ref] wrote:
On Sun, May 02, 2021 at 02:23:01PM -0700, Joe Perches wrote:
quoted
On Sun, 2021-05-02 at 15:32 -0500, Segher Boessenkool wrote:
quoted
On Sun, May 02, 2021 at 01:00:28PM -0700, Joe Perches wrote:
[]
quoted
quoted
Perhaps 8 might be best as that has a __diag warning control mechanism.
I have no idea what you mean?
? read the last bit of compiler-gcc.h
Ah, you mean
#pragma GCC diagnostic
(which has existed since GCC 4.2).  Does anything in this __diag stuff
require GCC 8?  Other than that this is hardcoded here :-)
The '8' was just a kernel thing, we made it configurable to have version
specific warnings, and I have a header file that adds these macros
for all supported compilers, but the version that is in mainline only does
it for gcc-8 or later.

Early compilers only supported "#pragma GCC diagnostic", but I think
even gcc-4.6 supported the _Pragma() syntax that lets you do it inside
of a macro.

It's something we should improve with plumbing on top, e.g. I want
a macro that lets you locally turn off both -Woverride-init on gcc
and -Winitializer-overrides on clang. It's not a reason to mandate
a newer compiler though.

        Arnd
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help