Sujet : Re: "A diagram of C23 basic types"
De : tr.17687 (at) *nospam* z991.linuxsc.com (Tim Rentsch)
Groupes : comp.lang.cDate : 03. Apr 2025, 04:53:49
Autres entêtes
Organisation : A noiseless patient Spider
Message-ID : <86wmc1hpde.fsf@linuxsc.com>
References : 1 2
User-Agent : Gnus/5.11 (Gnus v5.11) Emacs/22.4 (gnu/linux)
Janis Papanagnou <janis_papanagnou+
ng@hotmail.com> writes:
[...]
I see the 'bool' but recently seen mentioned some '_Bool' type.
The latter was probably chosen in that special syntax to avoid
conflicts during "C" language evolution?
How do regular "C" programmers handle that multitude of boolean
types; ranging from use of 'int', over own "bool" types, then
'_Bool', and now 'bool'? Since it's a very basic type it looks
like you need hard transitions in evolution of your "C" code?
I use a typedef, in order to isolate code from changes in the C
standard, and to facilitate moving code from one compilation
environment to another. As much as I can I try to write code
that is both platform- and standard-version- independent (within
limits, obviously, but usually code can be written so that there
will be complaints at compile time if the relevant limits are not
observed).