Patches 1, 2 and 3 are logically nothing to do with this feature.  I'll 
wait for them to be reviewed so that we only have a single-patch series, 
before doing final review of the main patch.

Since the feature was accepted as _Lengthof, that's the form that should 
be added to GCC; no __lengthof__ variant needed.  In general in GCC, 
although not strictly required by the standard in this case, we use 
pedwarn_c23 (pass OPT_Wpedantic as the option) to diagnose the use of a 
new C2Y feature that's not in C23 (if -pedantic with a pre-C2Y standard, 
or -Wc23-c2y-compat even in C2Y mode), with appropriate testcases to 
verify this (error with -std=c23 -pedantic-errors, warning with -std=c23 
-pedantic, no diagnostic with -std=c23 -pedantic-errors 
-Wno-c23-c2y-compat, no diagnostic with -std=c2y -pedantic-errors, warning 
with -std=c2y -pedantic-errors -Wc23-c2y-compat).  (pedwarn_c23 handles 
that logic, you just need the pedwarn_c23 call and the tests for those 
various cases.)

-- 
Joseph S. Myers
josmy...@redhat.com

Reply via email to