Hi Joseph,

On Tue, Oct 08, 2024 at 02:04:12PM GMT, Joseph Myers wrote:
> On Tue, 8 Oct 2024, Alejandro Colomar wrote:
> 
> > If you wish to wait for Graz to make sure there's no incompatibility
> > with ISO, that's another possibility.
> 
> The name could be changed in GCC after Graz (while in 
> regression-fixes-only mode for GCC 15) if WG14 changes the name in Graz.  
> It wouldn't be a good idea to add as a new feature while in 
> regression-fixes-only mode; waiting to after Graz for that would mean only 
> adding it in GCC 16.

I prefer waiting for Graz.  Merging _Lengthof already would provide less
incentive for WG14 to change their mind.  I don't mind having this in
GCC 16 instead of 15, if that's the only way.

Alternatively, you could consider countof for GCC 15, and optionally
rename it later if my arguments are dismissed.

Or you can merge yourself _Lengthof already, by sed(1)ing my patches, if
you wish.

> "length" is well-understood as referring to the number of elements of an 
> array even if not explicitly defined as such in the standard (cf. the noun 
> "variable" being well-understood by users of C even though the standard 
> always says "object").

> And there was along-the-lines support in 
> Strasbourg for N3187

I interpret something along the lines of n3187 to mean "we want to make
ISO C consistent with language" --which is an opinion I share--, rather
than specifically meaning that length is the only acceptable term.

> which, among other things, would make the use of 
> "length" for this consistent and explicit.

> I have plenty of concerns with 
> both the wording and incompatibility of various changes suggested there 
> related to what's allowed as a sizeof operand and associated semantics but 
> I don't think there were any concerns in that discussion about the use of 
> the term "length".

Now you've seen mine.  I will oppose to n3187 as much as I can, as long
as it offers length as the term.


Cheers,
Alex

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

Attachment: signature.asc
Description: PGP signature

Reply via email to