All of lore.kernel.org
 help / color / mirror / Atom feed
From: Michael Matz <matz@suse.de>
To: Peter Zijlstra <peterz@infradead.org>
Cc: Borislav Petkov <bp@alien8.de>,
	linux-toolchains@vger.kernel.org,
	Richard Biener <rguenther@suse.de>,
	lkml <linux-kernel@vger.kernel.org>
Subject: Re: older gccs and case labels producing integer constants
Date: Tue, 5 Apr 2022 12:39:20 +0000 (UTC)	[thread overview]
Message-ID: <alpine.LSU.2.20.2204051232101.963@wotan.suse.de> (raw)
In-Reply-To: <Ykw0wzdab0ICUFvy@hirez.programming.kicks-ass.net>

[-- Attachment #1: Type: text/plain, Size: 752 bytes --]

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.

  reply	other threads:[~2022-04-05 21:37 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-04-05  9:50 older gccs and case labels producing integer constants Borislav Petkov
2022-04-05  9:58 ` Richard Biener
2022-04-05 10:04   ` Borislav Petkov
2022-04-05 10:06   ` Richard Biener
2022-04-05 10:36     ` Borislav Petkov
2022-04-05 10:45       ` Borislav Petkov
2022-04-05 11:41         ` Richard Biener
2022-04-07 15:16           ` Borislav Petkov
2022-04-05 11:37       ` Richard Biener
2022-04-06  9:53       ` Jakub Jelinek
2022-04-06 10:04         ` Jakub Jelinek
2022-04-05 12:23 ` Peter Zijlstra
2022-04-05 12:39   ` Michael Matz [this message]
2022-04-05 12:53     ` Richard Biener
2022-04-05 13:04       ` Borislav Petkov
2022-04-06 10:13   ` Jakub Jelinek

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=alpine.LSU.2.20.2204051232101.963@wotan.suse.de \
    --to=matz@suse.de \
    --cc=bp@alien8.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-toolchains@vger.kernel.org \
    --cc=peterz@infradead.org \
    --cc=rguenther@suse.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.