Received: by 2002:a05:6a10:2726:0:0:0:0 with SMTP id ib38csp973992pxb; Wed, 6 Apr 2022 05:46:14 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwoYzKozV+Irovdl0SrAQbIg3zxtEeeYqsX0/deF/7FmWOzcsT37TyzvHvXhcFwd+bDHBCe X-Received: by 2002:a63:2c4c:0:b0:398:997d:b5b8 with SMTP id s73-20020a632c4c000000b00398997db5b8mr7099879pgs.86.1649249174221; Wed, 06 Apr 2022 05:46:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1649249174; cv=none; d=google.com; s=arc-20160816; b=T7XRP3dAxhmOkpscVQO4twOB1X4hWZwhxUqEDCOa5UcW76IM44FVrDnn8p4+73+YT+ rEtBP2fKJ+vQ0Kd9kCfY6WKTBucGb/uSIdylONbsJJ7OAlCxtNJreVII0lDgivXmZvYR wcmenX8oSX2kVXGgjOMMrMcKDZ6a1Q5R1V639OXnj9CHs5el9L0ptF2rFzfs3gyezzYh 8+aTq1D7OHYwXJKqaIswkKfGi9o6cN8ydnvXKwh1EFBhZIG2XoJOdqfkYkd+qGCZxkiZ DGBxEK3DSBqJEe4j6CkYk2L8I9OAFxFp95zxQUVAJClFuaebbC5R0Tz1SDNc6MODG0w8 28Nw== 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=6/5LBcy5siohW4oFuFeRpf6DCnAk2CessNOW+twB7uY=; b=kKnqd4X2dbYr7GXSpvXMxVflf1lo0ec07vztPYNwOwwuOVvBMyPrvDgPVV8Vs829BS fs4kqZ9XOVYTU1VDAx9mpbELngdG23ngrZQ7NeZDLmqvWkhUcxnKwlnnXJGuT1GhHemi ZpziKvAnSCa4DBeuPkHuV+N/xkPtTCND6hw6RD2WEgHcqJTmEUJLT5jqTqoJc+1gD3j7 V0GZquZ6BReCuqBB5LX4BSdotisk+WiDUXAmScnQj/BtUPS6GGH2cjWSAhFbP5CO4hQH UrHGb04DxFOLmDyZji5Ex6+8g8Tq/H8mR8Jrnxj3hFUC7qNStYcg/PU247YrOh4Tkyav 1K+g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@alien8.de header.s=dkim header.b=LGiTheZn; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=alien8.de Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id q2-20020a63ae02000000b0039895949d28si14387081pgf.575.2022.04.06.05.46.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 06 Apr 2022 05:46:14 -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=@alien8.de header.s=dkim header.b=LGiTheZn; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=alien8.de Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 3B1833E6950; Wed, 6 Apr 2022 02:24:09 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1582571AbiDEXsm (ORCPT + 99 others); Tue, 5 Apr 2022 19:48:42 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44030 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1357407AbiDELQY (ORCPT ); Tue, 5 Apr 2022 07:16:24 -0400 Received: from mail.skyhub.de (mail.skyhub.de [5.9.137.197]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C8E0F28E09; Tue, 5 Apr 2022 03:45:14 -0700 (PDT) Received: from zn.tnic (p2e55dff8.dip0.t-ipconnect.de [46.85.223.248]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.skyhub.de (SuperMail on ZX Spectrum 128k) with ESMTPSA id 7CE931EC02B9; Tue, 5 Apr 2022 12:45:09 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=alien8.de; s=dkim; t=1649155509; h=from:from: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=6/5LBcy5siohW4oFuFeRpf6DCnAk2CessNOW+twB7uY=; b=LGiTheZnyXcmHnN6XZzLCW/0mEVkEf7wOP1WEXJasS41X6E41rojW0fFU3DUbi95ouWOvL +qP8ubIgpxNuiDJ8B7mOShS68hHBrzc1vZijoUZorxOdnSsPWpR5IuIr9pdd9saOH/pVq9 4QE0lYfd7DhP+R9IBCJqJS8WuA9tED4= Date: Tue, 5 Apr 2022 12:45:11 +0200 From: Borislav Petkov To: Richard Biener Cc: linux-toolchains@vger.kernel.org, Michael Matz , lkml Subject: Re: older gccs and case labels producing integer constants Message-ID: 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-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 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? Ok, not really: gcc-10 -fsanitize=shift -c switch.c switch.c: In function ‘foo’: switch.c:10:7: error: case label does not reduce to an integer constant 10 | case (((0xfc08) << 16) | (0x0101)):; | ^~~~ BUT! when more switches are set with gcc-10 (full gcc cmdline from a kernel build), then that passes. But it doesn't pass with gcc-7. Weird... -- Regards/Gruss, Boris. https://people.kernel.org/tglx/notes-about-netiquette