Deutsch English Français Italiano |
<v98rgh$untn$1@dont-email.me> View for Bookmarking (what is this?) Look up another Usenet article |
Path: ...!weretis.net!feeder8.news.weretis.net!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail From: Thiago Adams <thiago.adams@gmail.com> Newsgroups: comp.lang.c Subject: Re: how cast works? Date: Sat, 10 Aug 2024 20:01:36 -0300 Organization: A noiseless patient Spider Lines: 16 Message-ID: <v98rgh$untn$1@dont-email.me> References: <v8vlo9$2oc1v$1@dont-email.me> <slrnvb7kis.28a.dan@djph.net> <v929ah$3u7l7$1@dont-email.me> <87ttfu94yv.fsf@nosuchdomain.example.com> <v93a3t$6q7v$1@dont-email.me> <v93e2q$8put$1@dont-email.me> <v94smd$mgp8$1@dont-email.me> <v95j4r$qh1q$3@dont-email.me> <v95okr$2oa92$1@dont-email.me> <v95sij$1arjo$3@dont-email.me> <v97eo3$i03p$2@dont-email.me> <v97p5g$lfau$1@dont-email.me> <v983ks$nglf$1@dont-email.me> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Date: Sun, 11 Aug 2024 01:01:38 +0200 (CEST) Injection-Info: dont-email.me; posting-host="5178e0c40238d6cd6e3cb7269b7f3c31"; logging-data="1007543"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19/fFVdljZjqPksvOY8ISG8gYzQAikFu1k=" User-Agent: Mozilla Thunderbird Cancel-Lock: sha1:L528cE0565wUkJLtuvCaUdsFiQs= Content-Language: en-GB In-Reply-To: <v983ks$nglf$1@dont-email.me> Bytes: 1896 Em 8/10/2024 1:14 PM, Bart escreveu: >> >> Bart, Does your compiler support the `bool` type, where the value is >> always either 1 or 0? > > There is a bool type, but it is treated like unsigned char, so is > non-conforming. I do the same in my compiler , when I transpile from C99 to C89. I was thinking how to make it conforming. For instance on each write. bool b = 123; -> unsigned char b = !!(123); The problem this does not fix unions, writing on int and reading from char.