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 describe what you've changed and how.
So probably something like:
* c-common.h (enum rid): Add RID_COUNTOF.
* c-common.def (COUNTOF_EXPR): New tree.
* c-common.cc (c_common_reswords): Add RID_COUNTOF entry.
(c_countof_type): New function.
You can use contrib/mklog, that at least pre-fills some of it for you.
Jakub