Re: [PATCH] longlong.h: Do no use asm input cast for clang

2023-01-10 Thread Joseph Myers
On Tue, 10 Jan 2023, Adhemerval Zanella Netto via Gcc-patches wrote: > That's my original intention [1], but Joseph stated that GCC is the upstream > source of this file. Joseph, would you be ok for a similar patch to glibc > since gcc is reluctant to accept it? I don't think it's a good idea fo

Re: [PATCH] longlong.h: Do no use asm input cast for clang

2023-01-10 Thread Segher Boessenkool
On Tue, Jan 10, 2023 at 03:35:37PM +0100, Andreas Schwab wrote: > On Jan 10 2023, Segher Boessenkool wrote: > > > The file starts with > > > > /* longlong.h -- definitions for mixed size 32/64 bit arithmetic. > >Copyright (C) 1991-2022 Free Software Foundation, Inc. > > > >This file is par

Re: [PATCH] longlong.h: Do no use asm input cast for clang

2023-01-10 Thread Andreas Schwab
On Jan 10 2023, Segher Boessenkool wrote: > The file starts with > > /* longlong.h -- definitions for mixed size 32/64 bit arithmetic. >Copyright (C) 1991-2022 Free Software Foundation, Inc. > >This file is part of the GNU C Library. > > Please change that first then? GCC is the source of

Re: [PATCH] longlong.h: Do no use asm input cast for clang

2023-01-10 Thread Segher Boessenkool
Hi! On Tue, Jan 10, 2023 at 09:26:13AM -0300, Adhemerval Zanella Netto wrote: > On 12/12/22 20:52, Segher Boessenkool wrote: > > On Mon, Dec 12, 2022 at 02:10:16PM -0300, Adhemerval Zanella Netto wrote: > > How do you intend to modify all the existing copies of the header that > > haven't been upd

Re: [PATCH] longlong.h: Do no use asm input cast for clang

2023-01-10 Thread Adhemerval Zanella Netto via Gcc-patches
On 12/12/22 20:52, Segher Boessenkool wrote: > On Mon, Dec 12, 2022 at 02:10:16PM -0300, Adhemerval Zanella Netto wrote: >> On 30/11/22 20:24, Segher Boessenkool wrote: >>> I understand that the casts should be no-ops on the asm side (maybe they >>> change the sign) and they are present as type-

Re: [PATCH] longlong.h: Do no use asm input cast for clang

2022-12-12 Thread Segher Boessenkool
On Mon, Dec 12, 2022 at 02:10:16PM -0300, Adhemerval Zanella Netto wrote: > On 30/11/22 20:24, Segher Boessenkool wrote: > > I understand that the casts should be no-ops on the asm side (maybe they > > change the sign) and they are present as type-checking. Can we implement > > this type-checking

Re: [PATCH] longlong.h: Do no use asm input cast for clang

2022-12-12 Thread Segher Boessenkool
Hi! On Thu, Dec 01, 2022 at 08:26:52AM +0100, Richard Biener wrote: > On Thu, Dec 1, 2022 at 12:26 AM Segher Boessenkool > wrote: > > 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:

Re: [PATCH] longlong.h: Do no use asm input cast for clang

2022-12-12 Thread Adhemerval Zanella Netto via Gcc-patches
On 30/11/22 20:24, Segher Boessenkool wrote: > 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

Re: [PATCH] longlong.h: Do no use asm input cast for clang

2022-11-30 Thread Richard Biener via Gcc-patches
On Thu, Dec 1, 2022 at 12:26 AM Segher Boessenkool wrote: > > 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:

Re: [PATCH] longlong.h: Do no use asm input cast for clang

2022-11-30 Thread Segher Boessenkool
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 -

[PATCH] longlong.h: Do no use asm input cast for clang

2022-11-30 Thread Adhemerval Zanella via Gcc-patches
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 remove