Hi! I've added the _Countof to ISO C2y and GCC 16. Clang 21 has also added it. There's a <stdcountof.h> compiler header with a countof macro too. <https://www.open-std.org/jtc1/sc22/wg14/www/docs/n3550.pdf#subsubsection.0.6.5.4.5> <https://thephd.dev/the-big-array-size-survey-for-c> <https://thephd.dev/the-big-array-size-survey-for-c-results> <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=117025> <https://github.com/llvm/llvm-project/issues/102836>
I see that gnulib uses the usual sizeof division often, so I was wondering if we should add the countof macro to gnulib with a fallback implementation when the system doesn't support it, and also use it within gnulib. What do you think? Have a lovely day! Alex -- <https://www.alejandro-colomar.es/>
signature.asc
Description: PGP signature
