[PATCH 01/11] stdlib/longlong.h: Remove incorrect lvalue to rvalue conversion from asm output constraints
Adhemerval Zanella Netto
adhemerval.zanella@linaro.org
Mon Nov 7 13:39:00 GMT 2022
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
>> <libc-alpha@sourceware.org> wrote:
>>>
>>> From: Fangrui Song <maskray@google.com>
>>>
>>> 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/
More information about the Libc-alpha
mailing list