Re: [PATCH v1 0/1] c: Add support for array parameters in _Countof

2025-09-03 Thread Alejandro Colomar
Hi Joseph, I'd like to ping about this thread. Cheers, Alex On Tue, Aug 19, 2025 at 12:44:29PM +0200, Alejandro Colomar wrote: > Hi Joseph, > > On Mon, Aug 18, 2025 at 11:19:39PM +, Joseph Myers wrote: > > On Fri, 15 Aug 2025, Alejandro Colomar wrote: > > > > > Hi Joseph, > > > > > > On

Re: [PATCH v1 0/1] c: Add support for array parameters in _Countof

2025-08-19 Thread Alejandro Colomar
Hi Joseph, On Mon, Aug 18, 2025 at 11:19:39PM +, Joseph Myers wrote: > On Fri, 15 Aug 2025, Alejandro Colomar wrote: > > > Hi Joseph, > > > > On Thu, Aug 14, 2025 at 10:03:00PM +, Joseph Myers wrote: > > > On Thu, 14 Aug 2025, Alejandro Colomar wrote: > > > > > > > And I'm proposing it

Re: [PATCH v1 0/1] c: Add support for array parameters in _Countof

2025-08-18 Thread Martin Uecker
Am Montag, dem 18.08.2025 um 23:19 + schrieb Joseph Myers: > On Fri, 15 Aug 2025, Alejandro Colomar wrote: > > > Hi Joseph, > > > > On Thu, Aug 14, 2025 at 10:03:00PM +, Joseph Myers wrote: > > > On Thu, 14 Aug 2025, Alejandro Colomar wrote: > > > > > > > And I'm proposing it as a GNU ex

Re: [PATCH v1 0/1] c: Add support for array parameters in _Countof

2025-08-18 Thread Joseph Myers
On Fri, 15 Aug 2025, Alejandro Colomar wrote: > Hi Joseph, > > On Thu, Aug 14, 2025 at 10:03:00PM +, Joseph Myers wrote: > > On Thu, 14 Aug 2025, Alejandro Colomar wrote: > > > > > And I'm proposing it as a GNU extension, which means we don't even need > > > to care about what ISO C says abo

Re: [PATCH v1 0/1] c: Add support for array parameters in _Countof

2025-08-14 Thread Alejandro Colomar
Hi Joseph, On Thu, Aug 14, 2025 at 10:03:00PM +, Joseph Myers wrote: > On Thu, 14 Aug 2025, Alejandro Colomar wrote: > > > And I'm proposing it as a GNU extension, which means we don't even need > > to care about what ISO C says about [n]. We, as a quality > > implementation, treat it with s

Re: [PATCH v1 0/1] c: Add support for array parameters in _Countof

2025-08-14 Thread Joseph Myers
On Thu, 14 Aug 2025, Alejandro Colomar wrote: > And I'm proposing it as a GNU extension, which means we don't even need > to care about what ISO C says about [n]. We, as a quality > implementation, treat it with stronger semantics, which this patch uses. As a GNU extension, it's also necessary t

Re: [PATCH v1 0/1] c: Add support for array parameters in _Countof

2025-08-14 Thread Alejandro Colomar
Hi Joseph, On Thu, Aug 14, 2025 at 06:44:07PM +, Joseph Myers wrote: > We'd need standard wording that's gone through several rounds of review in > WG14 before there's a reasonable basis for reviewing such a patch, given > how it's based on a very different conceptual model to how array > p

Re: [PATCH v1 0/1] c: Add support for array parameters in _Countof

2025-08-14 Thread Joseph Myers
We'd need standard wording that's gone through several rounds of review in WG14 before there's a reasonable basis for reviewing such a patch, given how it's based on a very different conceptual model to how array parameters are currently handled in the C standard. (And as noted on the reflecto

[PATCH v1 0/1] c: Add support for array parameters in _Countof

2025-08-14 Thread Alejandro Colomar
Hi! Here's a patch co-authored by Martin and I. It adds support for array parameters in _Countof, which will enable writing safer code that only specifies array bounds in function calls when strictly necessary, reducing the chances for mistakes. Here's an example program that never specifies bou