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:23:18 +0200 Organization: A noiseless patient Spider Lines: 30 Message-ID: References: <87ttfu94yv.fsf@nosuchdomain.example.com> <87bk228uzg.fsf@nosuchdomain.example.com> <20240809142622.467@kylheku.com> <87jzgp5php.fsf@nosuchdomain.example.com> <20240809152755.123@kylheku.com> <87frrd5jw7.fsf@nosuchdomain.example.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Injection-Date: Tue, 13 Aug 2024 11:23:18 +0200 (CEST) Injection-Info: dont-email.me; posting-host="c1a1041a93166a8aacca8d5e30b6a3ee"; logging-data="4014539"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1978AEa/EC+sm3Lp1soRPC+MSuY0lapz/M=" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.11.0 Cancel-Lock: sha1:Jbmq1WLYvICBYL/+KL0NbYo4XmE= In-Reply-To: Content-Language: en-GB Bytes: 2506 On 10/08/2024 02:11, Bart wrote: > On 10/08/2024 00:58, Keith Thompson wrote: > >> In any case, while there may be some ambiguity about whether all casts >> specify conversions, it is unambiguous that an implicit conversion is >> not a cast. >> > > Here are some comments from the Tiny C source code: > >         /* XXX: implicit cast ? */ >         /* compute bigger type and do implicit casts */ > > This is from some gcc code: > >      ..and some compilers cast it to int implicitly ... > > Come on, everybody's at it. Unless we're trying do to a reference > document, then /it really doesn't matter/. > > Do you also throw shopping trolleys into rivers, just because you see that other people have done so? comp.lang.c posters, compiler writers, and even the C standards writers, are fallible humans - they make mistakes sometimes. We all do. Why not try to correct the mistakes, or learn from them, rather than duplicating and spreading them?