Sujet : Re: integer divided by zero
De : jmccue (at) *nospam* magnetar.jmcunx.com (John McCue)
Groupes : comp.lang.cDate : 25. Apr 2025, 20:41:23
Autres entêtes
Organisation : A noiseless patient Spider
Message-ID : <vugoh3$mgd6$1@dont-email.me>
References : 1
User-Agent : tin/2.6.1-20211226 ("Convalmore") (Linux/5.15.161 (x86_64))
Thiago Adams <
thiago.adams@gmail.com> wrote:
Does anyone know of any platform where integer division by zero returns
a number, or in other words, where it's not treated as an error? I'm
asking because division by zero is undefined behaviour, but I think
division by a constant zero should be a constraint instead.
I know of none and I have programmed on a few platforms.
Some had the ability to trap these issues with a statement,
but usually it was easier to check for 0 first.
-- [t]csh(1) - "An elegant shell, for a more... civilized age." - Paraphrasing Star Wars