Sujet : Re: integer divided by zero
De : Keith.S.Thompson+u (at) *nospam* gmail.com (Keith Thompson)
Groupes : comp.lang.cDate : 25. Apr 2025, 21:32:53
Autres entêtes
Organisation : None to speak of
Message-ID : <87jz78oubu.fsf@nosuchdomain.example.com>
References : 1 2 3
User-Agent : Gnus/5.13 (Gnus v5.13)
Thiago Adams <
thiago.adams@gmail.com> writes:
[...]
Since 1/0 is not a constant, then if 1/0 were a constrain, the
programmer could use a variable instead.
>
static int zero = 0;
1/zero //ok
They could, but why? `1/zero` is not "ok"; it's undefined behavior.
-- Keith Thompson (The_Other_Keith) Keith.S.Thompson+u@gmail.comvoid Void(void) { Void(); } /* The recursive call of the void */