Hi Jakub,

On Tue, Oct 08, 2024 at 10:25:24AM GMT, Jakub Łukasiewicz wrote:
> I think it would be beneficial to have different syntax/spelling for
> features still in development. That way we, as a committee, can tweak it as
> we please, while mitigating effect on early adopters.
> 
> If what ends in final document is exactly the same as in early phrases, then
> great, all users are left to do is simple find and replace.
> 
> Warning about using an experimental feature that is prone to changes is
> obviously useful, but it disappears after upgrade to latest standard. If
> there were diverges between early and final versions, it would be nice to
> have warnings about that too.

How about adding the __lower__ version now as a GNU extension with
compatible semantics, and when it's closer to an ISO C2y release add the
_Upper one?

That gives us more freedom.

Cheers,
Alex

> 
> ~ J.Ł.
> 
> On 2024-10-07 19:35 CEST, Joseph Myers <josmy...@redhat.com> wrote:
> > 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.)

-- 
<https://www.alejandro-colomar.es/>

Attachment: signature.asc
Description: PGP signature

Reply via email to