Sujet : Re: Integral types and own type definitions (was Re: Suggested method for returning a string from a C program?)
De : Keith.S.Thompson+u (at) *nospam* gmail.com (Keith Thompson)
Groupes : comp.lang.cDate : 26. Mar 2025, 20:38:51
Autres entêtes
Organisation : None to speak of
Message-ID : <87o6xn60qc.fsf@nosuchdomain.example.com>
References : 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
User-Agent : Gnus/5.13 (Gnus v5.13)
Janis Papanagnou <janis_papanagnou+
ng@hotmail.com> writes:
On 26.03.2025 12:33, David Brown wrote:
[...]
Even in C (in a desperate attempt to bring us back on topic for the
group), there are no negative integer constants - merely positive
integer constants with a unary minus operator applied.
>
Is that so? (Harmlessly asking.) - I mean, if I write int x = -5;
does it matter (in "C") whether its parsed as <integer number> or
<negation> <positive number> ?
If -5 were a single token (an integer constant), then 6-5 would be an
integer constant 6 followed by an integer constant -5, a syntax error.
If INT_MIN is -2147483648 and INT_MAX is 2147483647, the expression
-2147483648 is of type long int. Implementations of <limits.h> have to
work around this.
[...]
-- Keith Thompson (The_Other_Keith) Keith.S.Thompson+u@gmail.comvoid Void(void) { Void(); } /* The recursive call of the void */