Re: [PATCH v22 0/3] c: Add _Countof and

2025-05-20 Thread Jakub Jelinek
On Tue, May 20, 2025 at 11:44:43PM +0200, Alejandro Colomar wrote: > Hi Jakub, > > On Tue, May 20, 2025 at 11:20:27PM +0200, Jakub Jelinek wrote: > > On Tue, May 20, 2025 at 11:12:38PM +0200, Alejandro Colomar wrote: > > > Okay; how about this? > > > > > > gcc/c-family/ChangeLog: > > > >

Re: [PATCH v22 0/3] c: Add _Countof and

2025-05-20 Thread Alejandro Colomar
Hi Jakub, On Tue, May 20, 2025 at 11:20:27PM +0200, Jakub Jelinek wrote: > On Tue, May 20, 2025 at 11:12:38PM +0200, Alejandro Colomar wrote: > > Okay; how about this? > > > > gcc/c-family/ChangeLog: > > > > * c-common.h: Add _Countof operator. > > * c-common.def:

Re: [PATCH v22 0/3] c: Add _Countof and

2025-05-20 Thread Jakub Jelinek
On Tue, May 20, 2025 at 11:12:38PM +0200, Alejandro Colomar wrote: > Okay; how about this? > > gcc/c-family/ChangeLog: > > * c-common.h: Add _Countof operator. > * c-common.def: Likewise. > * c-common.cc (c_countof_type): Likewise. No, that doesn't des

Re: [PATCH v22 0/3] c: Add _Countof and

2025-05-20 Thread Alejandro Colomar
Hi Jakub, On Tue, May 20, 2025 at 05:25:29PM +0200, Jakub Jelinek wrote: > On Tue, May 20, 2025 at 05:15:33PM +0200, Alejandro Colomar wrote: > > I've based on gnulib commits, which I believe follow the same > > guidelines. For example: > > > > commit 6608062398ef4c983a58b90a1520c39f12fb7ac1

Re: [PATCH v22 0/3] c: Add _Countof and

2025-05-20 Thread Jakub Jelinek
On Tue, May 20, 2025 at 05:15:33PM +0200, Alejandro Colomar wrote: > I've based on gnulib commits, which I believe follow the same > guidelines. For example: > > commit 6608062398ef4c983a58b90a1520c39f12fb7ac1 > Author: Paul Eggert > Date: Fri Jan 10 10:34:58 2025 -0800 > >

Re: [PATCH v22 0/3] c: Add _Countof and

2025-05-20 Thread Alejandro Colomar
Hi Joseph, On Tue, May 20, 2025 at 02:43:55PM +, Joseph Myers wrote: > > Could you please clarify if I need to do anything or if this is already > > scheduled for review when you have some time? Also please clarify if > > you're okay with amending that or if you prefer that I send v23. > > I

Re: [PATCH v22 0/3] c: Add _Countof and

2025-05-20 Thread Joseph Myers
On Tue, 20 May 2025, Alejandro Colomar wrote: > Could you please clarify if I need to do anything or if this is already > scheduled for review when you have some time? Also please clarify if > you're okay with amending that or if you prefer that I send v23. I have it on my list for review. I'd

Re: [PATCH v22 0/3] c: Add _Countof and

2025-05-20 Thread Alejandro Colomar
Hi Joseph, On Fri, May 16, 2025 at 07:13:15PM +0200, Alejandro Colomar wrote: > On Fri, May 16, 2025 at 05:01:36PM +, Joseph Myers wrote: > > On Fri, 16 May 2025, Alejandro Colomar wrote: > > > > > Hmmm, I've been trying to find a compromise between readability and > > > simplicity, and I thi

Re: [PATCH v22 0/3] c: Add _Countof and

2025-05-16 Thread Alejandro Colomar
Hi Joseph, On Fri, May 16, 2025 at 05:01:36PM +, Joseph Myers wrote: > On Fri, 16 May 2025, Alejandro Colomar wrote: > > > Hmmm, I've been trying to find a compromise between readability and > > simplicity, and I think I have something. I've seen some tests that > > define assert() themselve

Re: [PATCH v22 0/3] c: Add _Countof and

2025-05-16 Thread Joseph Myers
On Fri, 16 May 2025, Alejandro Colomar wrote: > Hmmm, I've been trying to find a compromise between readability and > simplicity, and I think I have something. I've seen some tests that > define assert() themselves. I like assert(3) because it's more > readable compared to a conditional plus abo

Re: [PATCH v22 0/3] c: Add _Countof and

2025-05-16 Thread Alejandro Colomar
Hi Joseph, On Fri, May 16, 2025 at 12:25:39PM +, Joseph Myers wrote: > On Fri, 16 May 2025, Alejandro Colomar wrote: > > > - Add (and NDEBUG) to some test files that were missing it, > >and also the forward declaration of strcmp(3). > > Depending on libc headers like this in tests is d

Re: [PATCH v22 0/3] c: Add _Countof and

2025-05-16 Thread Joseph Myers
On Fri, 16 May 2025, Alejandro Colomar wrote: > - Add (and NDEBUG) to some test files that were missing it, >and also the forward declaration of strcmp(3). Depending on libc headers like this in tests is discouraged. The usual idiom is to use abort () on failure of a runtime check (rather

Re: [PATCH v22 0/3] c: Add _Countof and

2025-05-15 Thread Alejandro Colomar
Here's the test run. No regressions. BTW, there are some differences between runs. I _think_ this is due to running them in separate days, and having run 'make install' in between, which seems to have made some tests that would normally fail now succeed but that's unrelated to the feature, and i

[PATCH v22 0/3] c: Add _Countof and

2025-05-15 Thread Alejandro Colomar
Hi, Here's the patch set. This time, feature complete, and fully tested with no regressions. I'll send a reply with the test results in a moment. v22 changes: - Move Link: tags to above the changelog, as Jason requested. - Update the tests for -pedantic-errors. Some tests are now errors