Received: by 2002:a05:6a10:2726:0:0:0:0 with SMTP id ib38csp1082855pxb; Wed, 6 Apr 2022 08:18:12 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy8M4KtjL/MKD043Rf8ck8NFXqFFPZtjBE+zPrdqchzBUZwLSkqRQxmlLY4iH9mXGk7VLQ/ X-Received: by 2002:a17:902:e846:b0:154:3d19:c5ae with SMTP id t6-20020a170902e84600b001543d19c5aemr9088618plg.87.1649258292344; Wed, 06 Apr 2022 08:18:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1649258292; cv=none; d=google.com; s=arc-20160816; b=CoxQ5MyIwlcAtBqeq2v7k09H+9rMxXrnFtc9FHLYTLyG/uNDg4gzsI0blN9v935Ne8 KY/nxkA1hNBpqt+XTV5vGoenqTv/BGoFMWhezXwuJf3a92dlrtM7ZMdUBPyXw9a/tZM9 vSLd/mtwhJi0KmGcF9s2v/oBOrgB4ftpqi2PbBMQicNXGIh/VrV9d4Rr1LGVBtolvYih raQUxFPwYECHlHTqR2LAzD+mz84OLbrBQd3GUZW69QOnHrsvVGryFuShI8ra3vBPqz6P 5Y8jB571NP+Ch1KIYzBe2jzykM0NpLGZSyVtIyzRIdfTsu4jKf6t8yG4EAwXt/L1Oayv 7rBQ== 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:reply-to:message-id :subject:cc:to:from:date:dkim-signature; bh=eG+lA98DgXDfZlx051ErYhuzaKYIyqcOJZfsLhGFR/o=; b=ApRf14SqlsMAh0Idp8AM/BQvVx4gjdri50IwNpPHvKoVkf6U9cDQX4iYBzLOyGYJZB KtwLrnvi70jE6vjGspYMQlY1ys3C/4itJAqDYcacQpevo8kXdLK1dI7LwkrCuP4hm2Lc KcMxFOii3xxqQApMzU2lP1C6SXoEstbWXScFdN8gr2RJZk9JaXydT7PXqZbIL4bupS2N ksZ4zRDgvnv4QD2Xuq6IiatYmpRjMzgyk0YsTcAShTUl+h2LWIJV63AJhIfbj/fcpVrG pV/0/5sNDZAbbAzWYOpjx15bVyd6oXpgGTCJg6Nqqi2qg4uUgoH+Dyhic3+JMAyeXL0k f7RQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=F0MVufxa; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id g15-20020a056a001a0f00b004fa3a8e0013si17729137pfv.202.2022.04.06.08.18.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 06 Apr 2022 08:18:12 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=F0MVufxa; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id D245B5A8EA3; Wed, 6 Apr 2022 06:17:36 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233019AbiDFNSu (ORCPT + 99 others); Wed, 6 Apr 2022 09:18:50 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54504 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233809AbiDFNSV (ORCPT ); Wed, 6 Apr 2022 09:18:21 -0400 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 6546949D65F for ; Wed, 6 Apr 2022 02:56:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1649238993; h=from:from:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=eG+lA98DgXDfZlx051ErYhuzaKYIyqcOJZfsLhGFR/o=; b=F0MVufxa1UuLTgwmgYatQzwxRlA1FHxn2AKzq+5HDktQ5llgtPPnBu78hUOTixREvabasK gPG7uBnsWxMlucNByfYI9LN9DJXnjAEPPYfj65JAlYHxFe7FExOKqOAFDOAxmJCnzf9vVm kvqO468ZvqsGtCPEAYMg9vF2b4MFjXo= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-287-eDrC-MY7P2-smmVV8MfwcA-1; Wed, 06 Apr 2022 05:53:20 -0400 X-MC-Unique: eDrC-MY7P2-smmVV8MfwcA-1 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.rdu2.redhat.com [10.11.54.1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id C29FD100BAAA; Wed, 6 Apr 2022 09:53:19 +0000 (UTC) Received: from tucnak.zalov.cz (unknown [10.39.195.172]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 7C6DD40CF905; Wed, 6 Apr 2022 09:53:19 +0000 (UTC) Received: from tucnak.zalov.cz (localhost [127.0.0.1]) by tucnak.zalov.cz (8.16.1/8.16.1) with ESMTPS id 2369rGLR1580461 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NOT); Wed, 6 Apr 2022 11:53:16 +0200 Received: (from jakub@localhost) by tucnak.zalov.cz (8.16.1/8.16.1/Submit) id 2369rFOl1580460; Wed, 6 Apr 2022 11:53:15 +0200 Date: Wed, 6 Apr 2022 11:53:15 +0200 From: Jakub Jelinek To: Borislav Petkov Cc: Richard Biener , linux-toolchains@vger.kernel.org, Michael Matz , lkml Subject: Re: older gccs and case labels producing integer constants Message-ID: Reply-To: Jakub Jelinek References: <7o5nn52-nqn1-oo13-s6o9-59r85r91o768@fhfr.qr> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: X-Scanned-By: MIMEDefang 2.84 on 10.11.54.1 X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, 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 12:36:58PM +0200, Borislav Petkov wrote: > On Tue, Apr 05, 2022 at 12:06:45PM +0200, Richard Biener wrote: > > Wird auch mit gcc 11 rejected. Kanns sein dass mit gcc 7 andere > > compiler flags genommen werden? > > Found it: > > $ gcc -fsanitize=shift -c switch.c > switch.c: In function ‘foo’: > switch.c:10:7: error: case label does not reduce to an integer constant > case (((0xfc08) << 16) | (0x0101)):; > > $ gcc --version > gcc (SUSE Linux) 7.4.1 20190905 [gcc-7-branch revision 275407] > Copyright (C) 2017 Free Software Foundation, Inc. > > Something not fully backported? That is rejected with -fsanitize=shift even on current trunk (in C, C++ is fine). C++ constexpr code has cases for ubsan builtins and internal functions, but C just doesn't handle those apparently. Jakub