Deutsch   English   Français   Italiano  
<vugoh3$mgd6$1@dont-email.me>

View for Bookmarking (what is this?)
Look up another Usenet article

Path: ...!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!eternal-september.org!.POSTED!not-for-mail
From: John McCue <jmccue@magnetar.jmcunx.com>
Newsgroups: comp.lang.c
Subject: Re: integer divided by zero
Date: Fri, 25 Apr 2025 19:41:23 -0000 (UTC)
Organization: A noiseless patient Spider
Lines: 14
Message-ID: <vugoh3$mgd6$1@dont-email.me>
References: <vughb7$g6cm$1@dont-email.me>
Reply-To: jmclnx@SPAMisBADgmail.com
Injection-Date: Fri, 25 Apr 2025 21:41:24 +0200 (CEST)
Injection-Info: dont-email.me; posting-host="0e00eb45b1af4131829a63454b93dc53";
	logging-data="737702"; mail-complaints-to="abuse@eternal-september.org";	posting-account="U2FsdGVkX18PZBKJb1Um9gOHGLZaIt5j"
User-Agent: tin/2.6.1-20211226 ("Convalmore") (Linux/5.15.161 (x86_64))
Cancel-Lock: sha1:9BYfCKqJocuX7U7VyRBY8t6vJaY=
X-OS-Version: Slackware 15.0 x86_64
Bytes: 1551

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