From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from gate.crashing.org (gate.crashing.org [63.228.1.57]) by sourceware.org (Postfix) with ESMTP id 4B3F53858D1E for ; Wed, 30 Nov 2022 23:25:57 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 4B3F53858D1E Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=kernel.crashing.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=kernel.crashing.org Received: from gate.crashing.org (localhost.localdomain [127.0.0.1]) by gate.crashing.org (8.14.1/8.14.1) with ESMTP id 2AUNOulU017409; Wed, 30 Nov 2022 17:24:56 -0600 Received: (from segher@localhost) by gate.crashing.org (8.14.1/8.14.1/Submit) id 2AUNOulO017408; Wed, 30 Nov 2022 17:24:56 -0600 X-Authentication-Warning: gate.crashing.org: segher set sender to segher@kernel.crashing.org using -f Date: Wed, 30 Nov 2022 17:24:56 -0600 From: Segher Boessenkool To: Adhemerval Zanella Cc: gcc-patches@gcc.gnu.org Subject: Re: [PATCH] longlong.h: Do no use asm input cast for clang Message-ID: <20221130232456.GT25951@gate.crashing.org> References: <20221130181625.2011166-1-adhemerval.zanella@linaro.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20221130181625.2011166-1-adhemerval.zanella@linaro.org> User-Agent: Mutt/1.4.2.3i X-Spam-Status: No, score=-3.0 required=5.0 tests=BAYES_00,JMQ_SPF_NEUTRAL,KAM_DMARC_STATUS,SPF_HELO_PASS,SPF_PASS,TXREP autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: Hi! On Wed, Nov 30, 2022 at 03:16:25PM -0300, Adhemerval Zanella via Gcc-patches wrote: > clang by default rejects the input casts with: > > error: invalid use of a cast in a inline asm context requiring an > lvalue: remove the cast or build with -fheinous-gnu-extensions > > And even with -fheinous-gnu-extensions clang still throws an warning > and also states that this option might be removed in the future. > For gcc the cast are still useful somewhat [1], so just remove it > clang is used. This is one of the things in inline asm that is tightly tied to GCC internals. You should emulate GCC's behaviour faithfully if you want to claim you implement the inline asm GNU C extension. > --- a/include/ChangeLog > +++ b/include/ChangeLog That should not be part of the patch? Changelog entries should be verbatim in the message you send. The size of this patch already makes clear this is a bad idea, imo. This code is already hard enough to read. Segher