Deutsch English Français Italiano |
<vevmfj$3p9it$1@raubtier-asyl.eternal-september.org> View for Bookmarking (what is this?) Look up another Usenet article |
Path: ...!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!raubtier-asyl.eternal-september.org!.POSTED!not-for-mail From: Bonita Montero <Bonita.Montero@gmail.com> Newsgroups: comp.lang.c Subject: Re: constexpr keyword is unnecessary Date: Sat, 19 Oct 2024 09:18:37 +0200 Organization: A noiseless patient Spider Lines: 11 Message-ID: <vevmfj$3p9it$1@raubtier-asyl.eternal-september.org> References: <veb5fi$3ll7j$1@dont-email.me> <877ca5q84u.fsf@nosuchdomain.example.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Date: Sat, 19 Oct 2024 09:18:11 +0200 (CEST) Injection-Info: raubtier-asyl.eternal-september.org; posting-host="bb15c8c102d048fa35c855181ad299ce"; logging-data="3974749"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+PhcQzPAO7tUQxPz82ju2VD3+JO5iRgMg=" User-Agent: Mozilla Thunderbird Cancel-Lock: sha1:TW4Li7vkk7BGXzxB6csA3MHWBUM= In-Reply-To: <877ca5q84u.fsf@nosuchdomain.example.com> Content-Language: de-DE Bytes: 1555 Am 19.10.2024 um 01:54 schrieb Keith Thompson: > The "const" keyword means "read-only"; ... A global const variable isn't even read-only, i.e. it's value is assumed to be static and never changed. The compiler never reads it but uses the constant which is assigned as an immediate value. I.e. if your platform allows you to change-the value through casting the updated value is never reflected in the other code.