| Deutsch English Français Italiano |
|
<877ccq8ck7.fsf@nosuchdomain.example.com> 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: Keith Thompson <Keith.S.Thompson+u@gmail.com>
Newsgroups: comp.lang.c
Subject: Re: how cast works?
Date: Thu, 08 Aug 2024 22:55:52 -0700
Organization: None to speak of
Lines: 19
Message-ID: <877ccq8ck7.fsf@nosuchdomain.example.com>
References: <v8vlo9$2oc1v$1@dont-email.me> <slrnvb7kis.28a.dan@djph.net>
<v929ah$3u7l7$1@dont-email.me> <v92gt1$e1l$1@dont-email.me>
<20240808193203.00006287@yahoo.com> <v92va5$4msg$1@dont-email.me>
<v9310a$4v1a$2@dont-email.me> <v93565$6ffo$1@dont-email.me>
<v93h12$9vom$1@dont-email.me>
<87frre8v5q.fsf@nosuchdomain.example.com>
<v93vvc$hjg3$4@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain
Injection-Date: Fri, 09 Aug 2024 07:55:52 +0200 (CEST)
Injection-Info: dont-email.me; posting-host="153d1bcdb0929153f62e0b2f2aa4005b";
logging-data="644636"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/nSA2Gg6yBRc37O6L4+daO"
User-Agent: Gnus/5.13 (Gnus v5.13)
Cancel-Lock: sha1:TC5zNdsmz9zg6QWd1d7AoqsBP+g=
sha1:p4mAfQB5Z2ltBOweFxobMxCoPaM=
Bytes: 2103
Lawrence D'Oliveiro <ldo@nz.invalid> writes:
> On Thu, 08 Aug 2024 16:14:09 -0700, Keith Thompson wrote:
>> The value of a _Bool object is always either 0 or 1 *unless* the program
>> does something weird.
>
> If a variable is declared to be of a particular type, does that mean that
> any possible value of that variable is, by definition, interpreted as some
> instance of that type?
Of course, given what "value" means. How could that not be the case?
If you mean any possible *representation* (for example, if _Bool is 8
bits there are 256 possible representations), I refer you to my previous
discussion of non-value representations (formerly called trap
representations) in the text that you snipped.
--
Keith Thompson (The_Other_Keith) Keith.S.Thompson+u@gmail.com
void Void(void) { Void(); } /* The recursive call of the void */