Sujet : Re: remark on defining size of basic types
De : janis_papanagnou+ng (at) *nospam* hotmail.com (Janis Papanagnou)
Groupes : comp.lang.cDate : 05. Apr 2024, 01:04:59
Autres entêtes
Organisation : A noiseless patient Spider
Message-ID : <uunf7c$v0kc$1@dont-email.me>
References : 1 2 3 4 5 6 7 8
User-Agent : Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0
On 04.04.2024 19:04, Michael S wrote:
On Thu, 4 Apr 2024 12:02:16 -0400
James Kuyper <jameskuyper@alumni.caltech.edu> wrote:
On 4/4/24 09:15, Janis Papanagnou wrote:
...
Since I remember C had always just defined a '<=' (or '>=') relation
between the unsized basic integral data types.
>
[...]
He meant sizeof(short) <= sizeof(int) <= sizeof(long) <= sizeof(long
long)
Yes, indeed I meant the size of the data types. The comparison
operators of the _values_ of data types wouldn't quite fit on
the topic at all, or so I thought. (Sorry for potentially bad
wording and any possible misinterpretation.)
I thought I've read about those properties at K&R times, that
these properties would hold, but a quick look into some old C
and UNIX books did not show that; only a comment that 'short'
is not larger than 'long'. But I found it in Stroustrup's C++
language book.
Not sure whether that's formally standardized for C.
Janis