[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <alpine.LSU.2.20.2204051232101.963@wotan.suse.de>
Date: Tue, 5 Apr 2022 12:39:20 +0000 (UTC)
From: Michael Matz <matz@...e.de>
To: Peter Zijlstra <peterz@...radead.org>
cc: Borislav Petkov <bp@...en8.de>, linux-toolchains@...r.kernel.org,
Richard Biener <rguenther@...e.de>,
lkml <linux-kernel@...r.kernel.org>
Subject: Re: older gccs and case labels producing integer constants
Hey,
On Tue, 5 Apr 2022, Peter Zijlstra wrote:
> > sound/usb/midi.c: In function ‘snd_usbmidi_out_endpoint_create’:
> > sound/usb/midi.c:1389:2: error: case label does not reduce to an integer constant
> > case (((0xfc08) << 16) | (0x0101)):
> > ^~~~
>
> IIRC GCC-8 fixed a bunch of -wrapv issues. Could be this is one of them
> I suppose.
Or better said, later GCCs returned back to the old behaviour of rejecting
this only with -pedantic even in the presence of -fsanitize. But
pedantically speaking (ahem!) it really isn't conforming c99 (which the
compilation flags claim) , and in this case it seems easy enough to make
the construct actually be conforming in the kernel sources, so that should
perhaps be done?
Ciao,
Michael.
Powered by blists - more mailing lists