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