From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-oi1-x229.google.com (mail-oi1-x229.google.com [IPv6:2607:f8b0:4864:20::229]) by sourceware.org (Postfix) with ESMTPS id 8B4E43857C4B for ; Mon, 7 Nov 2022 13:39:05 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 8B4E43857C4B Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=linaro.org Received: by mail-oi1-x229.google.com with SMTP id r76so12093606oie.13 for ; Mon, 07 Nov 2022 05:39:05 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=content-transfer-encoding:in-reply-to:organization:from:references :cc:to:content-language:subject:user-agent:mime-version:date :message-id:from:to:cc:subject:date:message-id:reply-to; bh=fplmyJ247GkJcWvoEOGXqY4mPt4KAsqkKEzsx/Sp8ME=; b=VRhWlfFxhTzIu5EEdkfrS7jFmD/ghKsQLaGvwgQHcesvAtWi59TGWloX8P7Lcz2hAc zp/QJJYG7DBXRf6taHK1HTfRjWZ57uvT9MS7nd9RU+3CfFHjZKDfU7RN6mbt94dPlaI5 ebnh+XzG+ukfraare5lZdJXKpV4HKwQxT1uG4ZAzVHJLSyCQjbxzJCpPFjJH5iq2/6PU pxD3PWYizSZRJIKbR4bXp+2sTHb/GnojYJKUyzx04tUtA2UZ5Qf5c5wFzFN6yiPnSPJ8 QCCC7/i8gEErsxS2NEv+zfVymLGI4fXd6QVgraMBxuift7m5aWEfM1VQFCAy3l6eor+V E8LA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:in-reply-to:organization:from:references :cc:to:content-language:subject:user-agent:mime-version:date :message-id:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=fplmyJ247GkJcWvoEOGXqY4mPt4KAsqkKEzsx/Sp8ME=; b=laQVSj6ZBw0UCpqa369clEWNfWy2VaTJOQCIH8WtyCrjdQYmoKEO7cQCyHvZO3MocN lpSDuKsP35dOuZPYNQ0qnLy6yNR+jtdSvynESrfFPBd6tZLROiIvKeU3+26gfcv3YnDJ UoHs7/5zmYHlhomacFvLG9lD+Iw/Qq+RyrHfNFiuEzuESDCH93vYqsPNu8MWYhtRHpxo nmrIaps3V7St6aj9WW9GlfyoWoH8+7v5QtNw0EPe5/YDtCT11NOGlfq0HWkdxL3k9L9r 7igrMjJPOnI9wUxYtJY/ch8cVMIKXwUBtIip9yVsIEW9CqLVr9GAi7H07TZ4WksVwqv2 LylA== X-Gm-Message-State: ACrzQf2N/r21mD/9xy/ZH2YjpknQQ7fYCLFHDb9gvfZXOxyHrekYVgpE 5oQ40L97LmRHKXAwCkxQzG7y0A== X-Google-Smtp-Source: AMsMyM5MAPX5ZZcruUONprLTtg6nRRojmjT3XTFVvZ0E2v5ypZMt4Bh9gX66UkqtMJeRREIbbWcTCg== X-Received: by 2002:aca:2b02:0:b0:35a:dda:8eb1 with SMTP id i2-20020aca2b02000000b0035a0dda8eb1mr21972088oik.243.1667828344763; Mon, 07 Nov 2022 05:39:04 -0800 (PST) Received: from ?IPV6:2804:1b3:a7c0:a9f4:fc60:ae8f:c4b6:cf0a? ([2804:1b3:a7c0:a9f4:fc60:ae8f:c4b6:cf0a]) by smtp.gmail.com with ESMTPSA id z14-20020a9d65ce000000b00661948e6119sm2971401oth.47.2022.11.07.05.39.02 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 07 Nov 2022 05:39:03 -0800 (PST) Message-ID: <5df804af-df66-fee4-412e-a88fa067fa2f@linaro.org> Date: Mon, 7 Nov 2022 10:39:00 -0300 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:102.0) Gecko/20100101 Thunderbird/102.4.1 Subject: Re: [PATCH 01/11] stdlib/longlong.h: Remove incorrect lvalue to rvalue conversion from asm output constraints Content-Language: en-US To: Fangrui Song , Andrew Pinski , Jakub Jelinek Cc: libc-alpha@sourceware.org, Joseph Myers References: <20221028173532.876027-1-adhemerval.zanella@linaro.org> <20221028173532.876027-2-adhemerval.zanella@linaro.org> <20221106193210.i6qvkstumiikkvn2@google.com> From: Adhemerval Zanella Netto Organization: Linaro In-Reply-To: <20221106193210.i6qvkstumiikkvn2@google.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-6.1 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,KAM_SHORT,NICE_REPLY_A,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: On 06/11/22 16:32, Fangrui Song wrote: > [Fixing email address.. Really sorry for my mistake.] > > On 2022-11-01, Andrew Pinski via Libc-alpha wrote: >> On Fri, Oct 28, 2022 at 10:36 AM Adhemerval Zanella via Libc-alpha >> wrote: >>> >>> From: Fangrui Song >>> >>> An output constraint takes a lvalue. While GCC happily strips the >>> incorrect lvalue to rvalue conversion, Clang rejects the code by >>> default: >> >> For GCC this is https://gcc.gnu.org/bugzilla/show_bug.cgi?id=2803 . >> I wrote about the ones in longlong.h (inside GCC sources) in comment >> #11 back in 2004 when I tried to fix GCC's front-end to reject this. >> >> Thanks, >> Andrew > > Thanks for the comment.  Would GCC side consider > https://gcc.gnu.org/pipermail/gcc-patches/2021-October/581722.html ? > If GCC takes the patch to its diverged GMP 2.0 copy (released 1996), glibc can import the change. It would make the glibc changes way easier to maintain, since I really dislike the hack I proposed to fix on glibc side [1] (which I don't see how to fix it without rewriting a lot of stuff to avoid the use of longlong.h). [1] https://patchwork.sourceware.org/project/glibc/patch/20221102145559.1962008-4-adhemerval.zanella@linaro.org/