Received: by 2002:a05:6a10:2726:0:0:0:0 with SMTP id ib38csp968829pxb; Wed, 6 Apr 2022 05:36:38 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzxkOwNa0kmsGfsW47QDZpVBYjMtY55kZvm13+wl4XaJ68FXNwemZGWrOgmdnijp6Glx6bM X-Received: by 2002:a17:90a:8595:b0:1bb:fbfd:bfbf with SMTP id m21-20020a17090a859500b001bbfbfdbfbfmr9601638pjn.125.1649248598633; Wed, 06 Apr 2022 05:36:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1649248598; cv=none; d=google.com; s=arc-20160816; b=GVlNYUHL7ULliL5Vl/TLXThFGoVDcxZYv7lyD19GwXEa+H/7awlT3inMKHqk2IDyqh y0hufKF7f2MAdZ7YSQXdyRorR69S9vEPZK6h6/f64qCVzrMAan3YFyecJ9R8Pg9Xn1/E /SrevC1kJkWL24AZou36VqYCKqgD7uUUzZBRh54yL2DbBctXX+J+dQCSAilWfIBpZNIg O4EZRrIxGEErqRBOIL0SIra6OmDIHJW+hVrSENTM9oETYxmN2yAQwa0ongGgY9AUw6a2 uHmJc+yA7vDaF8u/MLluFj0TV1Hi1V6d+BD6GffoBDBNs4s41FEZgsTol5Q6fsV53iqP rAvA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=E3zotaW1dbgZPSLuwko0wembR1SFboZ06zEGfDaR1Q4=; b=whsKrRVneSOxPBJHVfjTdsWs1ackrPCDN93qPW5j4ni/qW/RngJrkXmHiA5gCCVv6Z hQgrTNzcxubj6luQHTEpCsrAwDIQQXubmxO55/lJufMKEkgYYJE0zM67TRpefbxhLVIj UmL4mrsZPiQdiVLGR7EFUIbNvZtrLGOHQErn762jDgm21WTUEtRmZiHmB/d1SdIAo8cK OeVnWREkAuA138ltkdslcF6c3St0huaU0eRTZvryFrXpll3sMWuq83x4h64cpfNJiZYC PcEvown2YBaoglm4ySMsgsTLjxrpZdEAnbkLA6/uBWw1AGRY7LnDdlJbnFK+o7P2a3ED zIgg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=desiato.20200630 header.b=SpJ0FYLI; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id a38-20020a056a001d2600b004fdeb623920si11722304pfx.171.2022.04.06.05.36.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 06 Apr 2022 05:36:38 -0700 (PDT) Received-SPF: softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; dkim=pass header.i=@infradead.org header.s=desiato.20200630 header.b=SpJ0FYLI; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id E25654D93A0; Wed, 6 Apr 2022 02:12:39 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1453662AbiDEWdc (ORCPT + 99 others); Tue, 5 Apr 2022 18:33:32 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45346 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1387971AbiDENUQ (ORCPT ); Tue, 5 Apr 2022 09:20:16 -0400 Received: from desiato.infradead.org (desiato.infradead.org [IPv6:2001:8b0:10b:1:d65d:64ff:fe57:4e05]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2EE59D95D5; Tue, 5 Apr 2022 05:23:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=desiato.20200630; h=In-Reply-To:Content-Transfer-Encoding: Content-Type:MIME-Version:References:Message-ID:Subject:Cc:To:From:Date: Sender:Reply-To:Content-ID:Content-Description; bh=E3zotaW1dbgZPSLuwko0wembR1SFboZ06zEGfDaR1Q4=; b=SpJ0FYLIVRfgL1ql9NafIxHBTk BWwcskNqRk7OMiga0j8XKJLMZbg0euqmaPZtVo13hltNk45VVcrsUp3Xs9Ul1FModE6HDvLgKQSEP nV1v9/rBdaSUupc/AF/o0Kogzjif0FBSMYzweFig8FjlWYA0VECv5+iXZjPwUveBhdgA7cTgaTRGS v9H3aY29hKR45cjXU5ytSBbm+YCBMJxJMcTvLWiRhJooFLSWhLypLyW2dOTnuOs6gs2VjU0jvcv62 iGcdlMy3XYnOQZDhbRIer9AOXGCiY1rRtBzyuwZ1DqfhqetQiQhgsstfd0coTmKLf6fZnMQq1ft8P hO3fwNMQ==; Received: from j217100.upc-j.chello.nl ([24.132.217.100] helo=noisy.programming.kicks-ass.net) by desiato.infradead.org with esmtpsa (Exim 4.94.2 #2 (Red Hat Linux)) id 1nbiDd-001qvS-Eh; Tue, 05 Apr 2022 12:23:34 +0000 Received: from hirez.programming.kicks-ass.net (hirez.programming.kicks-ass.net [192.168.1.225]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (Client did not present a certificate) by noisy.programming.kicks-ass.net (Postfix) with ESMTPS id E0F2E3001EA; Tue, 5 Apr 2022 14:23:31 +0200 (CEST) Received: by hirez.programming.kicks-ass.net (Postfix, from userid 1000) id 819002019C0B6; Tue, 5 Apr 2022 14:23:31 +0200 (CEST) Date: Tue, 5 Apr 2022 14:23:31 +0200 From: Peter Zijlstra To: Borislav Petkov Cc: linux-toolchains@vger.kernel.org, Michael Matz , Richard Biener , lkml Subject: Re: older gccs and case labels producing integer constants Message-ID: References: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Apr 05, 2022 at 11:50:35AM +0200, Borislav Petkov wrote: > Hi folks, > > I'm starting to see failures like this on allmodconfig builds: > > 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)): > ^~~~ > > (The case statement is a macro but it evaluates to what I have there) > > and that thing fails with > > $ gcc --version > gcc (SUSE Linux) 7.5.0 > > although it doesn't have any problems building with newer compilers. > > I'm presuming older gccs consider those case statements signed ints and > the following fixes it: > > case ((((unsigned int)0xfc08) << 16) | (0x0101)): > > and I guess we can whack the couple of occurrences but what I'm > wondering is why does this work with newer gccs? IIRC GCC-8 fixed a bunch of -wrapv issues. Could be this is one of them I suppose.