Deutsch   English   Français   Italiano  
<vf4t01$qo5f$1@dont-email.me>

View for Bookmarking (what is this?)
Look up another Usenet article

Path: ...!news.roellig-ltd.de!open-news-network.org!weretis.net!feeder8.news.weretis.net!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: David Brown <david.brown@hesbynett.no>
Newsgroups: comp.lang.c
Subject: Re: constexpr keyword is unnecessary
Date: Mon, 21 Oct 2024 08:40:01 +0200
Organization: A noiseless patient Spider
Lines: 31
Message-ID: <vf4t01$qo5f$1@dont-email.me>
References: <veb5fi$3ll7j$1@dont-email.me>
 <877ca5q84u.fsf@nosuchdomain.example.com> <vf0ijd$3u54q$1@dont-email.me>
 <vf0l98$3un4n$1@dont-email.me> <vf0ps2$3vf16$1@dont-email.me>
 <vf2mno$c52l$1@dont-email.me> <87iktmpr2f.fsf@nosuchdomain.example.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Mon, 21 Oct 2024 08:40:01 +0200 (CEST)
Injection-Info: dont-email.me; posting-host="c05654bc693211083b5fa6b4fbbdfea8";
	logging-data="876719"; mail-complaints-to="abuse@eternal-september.org";	posting-account="U2FsdGVkX19zrl8Zic2wN8dNPYtDgOtuXCOxPen1OQo="
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101
 Thunderbird/102.11.0
Cancel-Lock: sha1:ZK6gVZYtnYv8hOpHaU2+06UuNqI=
In-Reply-To: <87iktmpr2f.fsf@nosuchdomain.example.com>
Content-Language: en-GB
Bytes: 2789

On 20/10/2024 20:28, Keith Thompson wrote:
> David Brown <david.brown@hesbynett.no> writes:
> [...]
>> I know there are compilers that don't support VLAs at all - that's
>> fair enough (and that's why I specifically mentioned it).  We can
>> expect that compilers that can't handle VLAs at all will not support
>> C23 constexpr, or any suggested C++ style extensions to the semantics
>> of "const".
> 
> Why would we expect that?
> 
> IIRC, Microsoft has decided not to support VLAs in its C compiler.  If
> they chose not to support constexpr, they could not claim C23 conformance.
> 

MS is in a somewhat different position than other C compiler vendors. 
They decided - for various reasons - not to support C99 other than parts 
that had direct correspondence with C++ features.  Without having 
followed any of the proceedings, I suspect the reason VLAs are optional 
in C23 is because MS wants to avoid adding more than they have to before 
being able to jump to (approximate) C23 conformance.  "constexpr" will 
be relatively easy for them, as they have it in C++ already.

(I don't know how recently updated the cppreference page on C23 compiler 
support is, but if it is accurate, MS has a long way to go before C23 
conformance - if that is even their aim.)

Pretty much every other C compiler that aims for at least vague 
conformance, AFAIK, has done so linearly through the standards versions.