Path: ...!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail From: David Brown Newsgroups: comp.lang.c Subject: Re: how cast works? Date: Tue, 13 Aug 2024 11:18:31 +0200 Organization: A noiseless patient Spider Lines: 24 Message-ID: References: <87ttfu94yv.fsf@nosuchdomain.example.com> <87bk228uzg.fsf@nosuchdomain.example.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Date: Tue, 13 Aug 2024 11:18:31 +0200 (CEST) Injection-Info: dont-email.me; posting-host="c1a1041a93166a8aacca8d5e30b6a3ee"; logging-data="4014539"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19+vbVi1TqV/E9Ygf3hhzeEChgqp6nhSMs=" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.11.0 Cancel-Lock: sha1:5q+13fLRYuR7FlYRH34MCa8dHbI= Content-Language: en-GB In-Reply-To: Bytes: 2239 On 10/08/2024 00:29, James Kuyper wrote: > Bart writes: > >> Also, what is exactly is the difference between 'explicit conversion' >> and 'explicit cast'? > > None > It is possible that the C standards authors here were envisaging other types of explicit conversion in the future. For example, C++ has multiple forms of explicit conversion, at least some of which could reasonably be copied into C (such as the functional notation explicit type conversions - "int(x)", meaning the same as the cast "(int) x"). You could argue that the C standards use the term "explicit conversion" to make it clear that there are no /implicit/ conversions involved. It does not matter if the explicit conversion is done with a cast operator, or in some other way - even if C (currently) has no other way to achieve the effect.