Re: bounds checking / VLA types

2025-03-27 Thread Martin Uecker via Gcc
Am Donnerstag, dem 27.03.2025 um 17:01 -0700 schrieb Bill Wendling via Gcc: > On Tue, Mar 25, 2025 at 10:13 PM Martin Uecker wrote: > > Am Dienstag, dem 25.03.2025 um 19:09 -0700 schrieb Bill Wendling: > > > On Tue, Mar 18, 2025 at 3:04 PM Martin Uecker wrote: > > > > > > > > > > > > It seems

Re: bounds checking / VLA types

2025-03-27 Thread Bill Wendling via Gcc
On Tue, Mar 25, 2025 at 10:13 PM Martin Uecker wrote: > Am Dienstag, dem 25.03.2025 um 19:09 -0700 schrieb Bill Wendling: > > On Tue, Mar 18, 2025 at 3:04 PM Martin Uecker wrote: > > > > > > > > It seems clear that using "__self" is most likely going to be part of > > any solution we come up with

Re: bounds checking / VLA types

2025-03-25 Thread Martin Uecker via Gcc
Am Dienstag, dem 25.03.2025 um 19:09 -0700 schrieb Bill Wendling: > On Tue, Mar 18, 2025 at 3:04 PM Martin Uecker wrote: > > > > It seems clear that using "__self" is most likely going to be part of > any solution we come up with. What we need to avoid is feature skew > between GCC and Clang. I

Re: bounds checking / VLA types

2025-03-25 Thread Bill Wendling via Gcc
On Tue, Mar 18, 2025 at 3:04 PM Martin Uecker wrote: > > Am Dienstag, dem 18.03.2025 um 14:03 -0700 schrieb Yeoul Na via Gcc: > > > > > On Mar 18, 2025, at 12:48 PM, Martin Uecker wrote: > > > > > > Am Dienstag, dem 18.03.2025 um 09:52 -0700 schrieb Yeoul Na via Gcc: > > > > > > > > > On Mar 18,

Re: bounds checking / VLA types

2025-03-18 Thread Martin Uecker via Gcc
Am Dienstag, dem 18.03.2025 um 14:03 -0700 schrieb Yeoul Na via Gcc: > > > On Mar 18, 2025, at 12:48 PM, Martin Uecker wrote: > > > > Am Dienstag, dem 18.03.2025 um 09:52 -0700 schrieb Yeoul Na via Gcc: > > > > > > > On Mar 18, 2025, at 12:16 AM, Martin Uecker wrote: > > > > > > > > When xp->

Re: bounds checking / VLA types

2025-03-18 Thread Yeoul Na via Gcc
> On Mar 18, 2025, at 12:48 PM, Martin Uecker wrote: > > Am Dienstag, dem 18.03.2025 um 09:52 -0700 schrieb Yeoul Na via Gcc: >> >>> On Mar 18, 2025, at 12:16 AM, Martin Uecker wrote: >>> >>> When xp->ptr is accessed, the size expression >>> is evaluated and the lvalue which is formed at th

Re: bounds checking / VLA types

2025-03-18 Thread Yeoul Na via Gcc
> On Mar 18, 2025, at 12:16 AM, Martin Uecker wrote: > > When xp->ptr is accessed, the size expression > is evaluated and the lvalue which is formed at this point in > time gets the type int(*)[xp->count], similar to how the size > expression of function arguments are evaluated when the > func

Re: bounds checking / VLA types

2025-03-18 Thread Martin Uecker via Gcc
Am Dienstag, dem 18.03.2025 um 09:52 -0700 schrieb Yeoul Na via Gcc: > > > On Mar 18, 2025, at 12:16 AM, Martin Uecker wrote: > > > > When xp->ptr is accessed, the size expression > > is evaluated and the lvalue which is formed at this point in > > time gets the type int(*)[xp->count], similar t

Re: bounds checking / VLA types

2025-03-18 Thread Martin Uecker via Gcc
Am Montag, dem 17.03.2025 um 16:45 -0700 schrieb Yeoul Na via Gcc: > > > > > > On Mar 15, 2025, at 1:27 AM, Martin Uecker wrote: ... > > > > > > > > > > > > Anyway, a lot of this changes if we want to use the same > > > > > > > > concept for > > > > > > > > non-local pointers to arrays, becau

Re: bounds checking / VLA types

2025-03-17 Thread Yeoul Na via Gcc
> On Mar 15, 2025, at 1:27 AM, Martin Uecker wrote: > > > Hi John, > > (I changed gcc-patches to gcc) > > Am Samstag, dem 15.03.2025 um 00:22 -0400 schrieb John McCall: >>> On 14 Mar 2025, at 15:18, Martin Uecker wrote: > > ... > > But let's rephrase my point a bit more precisely:

bounds checking / VLA types

2025-03-15 Thread Martin Uecker via Gcc
Hi John, (I changed gcc-patches to gcc) Am Samstag, dem 15.03.2025 um 00:22 -0400 schrieb John McCall: > > On 14 Mar 2025, at 15:18, Martin Uecker wrote: > > > > ... > > > > But let's rephrase my point a bit more precisely: One could take > > > > a strict subset of C that includes variably mo