aliasing

2024-03-18 Thread Martin Uecker via Gcc
Hi, can you please take a quick look at this? This is intended to align the C standard with existing practice with respect to aliasing by removing the special rules for "objects with no declared type" and making it fully symmetric and only based on types with non-atomic character types being abl

Re: aliasing

2024-03-18 Thread Richard Biener via Gcc
On Mon, Mar 18, 2024 at 8:03 AM Martin Uecker wrote: > > > Hi, > > can you please take a quick look at this? This is intended to align > the C standard with existing practice with respect to aliasing by > removing the special rules for "objects with no declared type" and > making it fully symmetri

Re: aliasing

2024-03-18 Thread David Brown
Hi, I would very glad to see this change in the standards. Should "byte type" include all character types (signed, unsigned and plain), or should it be restricted to "unsigned char" since that is the "byte" type ? (I think allowing all character types makes sense, but only unsigned char is

Re: aliasing

2024-03-18 Thread Jonathan Wakely via Gcc
On Mon, 18 Mar 2024 at 09:01, David Brown wrote: > Should it also include "uint8_t" (if it exists) ? "uint8_t" is often an > alias for "unsigned char", but it could be something different, like an > alias for __UINT8_TYPE__, or "unsigned int > __attribute__((mode(QImode)))", which is used in the A

Re: aliasing

2024-03-18 Thread Martin Uecker via Gcc
Am Montag, dem 18.03.2024 um 09:26 +0100 schrieb Richard Biener: > On Mon, Mar 18, 2024 at 8:03 AM Martin Uecker wrote: > > > > > > Hi, > > > > can you please take a quick look at this? This is intended to align > > the C standard with existing practice with respect to aliasing by > > removing

Re: aliasing

2024-03-18 Thread Martin Uecker via Gcc
Hi David, Am Montag, dem 18.03.2024 um 10:00 +0100 schrieb David Brown: > Hi, > > I would very glad to see this change in the standards. > > > Should "byte type" include all character types (signed, unsigned and > plain), or should it be restricted to "unsigned char" since that is the > "b

Re: aliasing

2024-03-18 Thread Martin Uecker via Gcc
Am Montag, dem 18.03.2024 um 11:55 +0100 schrieb Martin Uecker: > Am Montag, dem 18.03.2024 um 09:26 +0100 schrieb Richard Biener: > > On Mon, Mar 18, 2024 at 8:03 AM Martin Uecker wrote: > > > > > > > Let me give you an complication example made valid in C++: > > > > struct B { float x; float

Re: aliasing

2024-03-18 Thread Richard Biener via Gcc
On Mon, Mar 18, 2024 at 12:56 PM Martin Uecker wrote: > > Am Montag, dem 18.03.2024 um 11:55 +0100 schrieb Martin Uecker: > > Am Montag, dem 18.03.2024 um 09:26 +0100 schrieb Richard Biener: > > > On Mon, Mar 18, 2024 at 8:03 AM Martin Uecker wrote: > > > > > > > > > > > Let me give you an compli

Re: aliasing

2024-03-18 Thread David Brown
On 18/03/2024 12:41, Martin Uecker wrote: Hi David, Am Montag, dem 18.03.2024 um 10:00 +0100 schrieb David Brown: Hi, I would very glad to see this change in the standards. Should "byte type" include all character types (signed, unsigned and plain), or should it be restricted to "unsign

Re: aliasing

2024-03-18 Thread Andreas Schwab via Gcc
On Mär 18 2024, David Brown wrote: > I think it would be possible to have an implementation where "signed > char" was 8-bit two's complement except that 0x80 would be a trap > representation rather than -128. signed char cannot have padding bits, thus it cannot have a trap representation. -- An

Re: aliasing

2024-03-18 Thread Martin Uecker via Gcc
Am Montag, dem 18.03.2024 um 14:29 +0100 schrieb David Brown: > > On 18/03/2024 12:41, Martin Uecker wrote: > > > > > > Hi David, > > > > Am Montag, dem 18.03.2024 um 10:00 +0100 schrieb David Brown: > > > Hi, > > > > > > I would very glad to see this change in the standards. > > > > > > > >

Re: aliasing

2024-03-18 Thread Martin Uecker via Gcc
Am Montag, dem 18.03.2024 um 14:21 +0100 schrieb Richard Biener: > On Mon, Mar 18, 2024 at 12:56 PM Martin Uecker wrote: > > > > Am Montag, dem 18.03.2024 um 11:55 +0100 schrieb Martin Uecker: > > > Am Montag, dem 18.03.2024 um 09:26 +0100 schrieb Richard Biener: > > > > On Mon, Mar 18, 2024 at 8

Re: [RFC] add regenerate Makefile target

2024-03-18 Thread Christophe Lyon via Gcc
On Fri, 15 Mar 2024 at 15:13, Eric Gallager wrote: > > On Fri, Mar 15, 2024 at 4:53 AM Christophe Lyon via Gcc > wrote: > > > > On Thu, 14 Mar 2024 at 19:10, Simon Marchi wrote: > > > > > > > > > > > > On 2024-03-13 04:02, Christophe Lyon via Gdb wrote: > > > > Hi! > > > > > > > > After recent

Re: aliasing

2024-03-18 Thread David Brown via Gcc
On 18/03/2024 14:54, Andreas Schwab via Gcc wrote: On Mär 18 2024, David Brown wrote: I think it would be possible to have an implementation where "signed char" was 8-bit two's complement except that 0x80 would be a trap representation rather than -128. signed char cannot have padding bits, t

Re: aliasing

2024-03-18 Thread David Brown
On 18/03/2024 17:46, David Brown via Gcc wrote: On 18/03/2024 14:54, Andreas Schwab via Gcc wrote: On Mär 18 2024, David Brown wrote: I think it would be possible to have an implementation where "signed char" was 8-bit two's complement except that 0x80 would be a trap representation rather tha

Re: aliasing

2024-03-18 Thread David Brown
On 18/03/2024 16:00, Martin Uecker via Gcc wrote: Am Montag, dem 18.03.2024 um 14:29 +0100 schrieb David Brown: On 18/03/2024 12:41, Martin Uecker wrote: Hi David, Am Montag, dem 18.03.2024 um 10:00 +0100 schrieb David Brown: Hi, I would very glad to see this change in the standards. Sh

Re: [RFC] add regenerate Makefile target

2024-03-18 Thread Christophe Lyon via Gcc
On Sat, 16 Mar 2024 at 18:16, Simon Marchi wrote: > > > > On 2024-03-15 04:50, Christophe Lyon via Gdb wrote: > > On Thu, 14 Mar 2024 at 19:10, Simon Marchi wrote: > >> My first thought it: why is it a Makefile target, instead of some script > >> on the side (like autoregen.sh). It would be nice

Re: [RFC] add regenerate Makefile target

2024-03-18 Thread Christophe Lyon via Gcc
On Fri, 15 Mar 2024 at 15:25, Tom Tromey wrote: > > > "Eric" == Eric Gallager writes: > > Eric> Also there are the files generated by cgen, too, which no one seems to > Eric> know how to regenerate, either. > > I thought I sent out some info on this a while ago. > > Anyway what I do is make a