🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: sci.electronics.design
Article #1068

Re: Arms race

#1068
From: Bill Sloman
Date: Thu, 12 Nov 2026 04:35
25 lines
2967 bytes
On 10/11/2026 10:02 pm, Johann 'Myrkraverk' Oskarsson wrote:
> On 11/10/2026 5:14 AM, Waldek Hebisch wrote:
>> Actually, at '-O2' version of 'gcc' that I use replaces explicit
>> division by 0 by the 'ud2' instruction.
> 
> Shouldn't that be considered /erroneous compilation/?  I mean, you can
> write a signal handler that catches all signals, and isn't /division by
> zero/ one of the Posix signals?  Is the compiler prescient and makes
> sure this only happens if the binary is ever run when the user isn't ex-
> plictly expecting a division by zero -- rather than /invalid opcode/?
> 
> Does the question bother you?  Am I too high, or too low on the /moron/
> vs. /jedi master/ axis to be understood?  Should we put all the GCC devs
> in therapy for believing they are prescient?

I imagine that there are situations where the programmer can be 
confident that the divisor is never going to be zero.

A cautious programmer might test for a zero divisor and run an error 
recovery routine rather than doing the division.

To me it does look as if you've posted an under-informed response.

-- 
Bill Sloman, Sydney
Technical Details
Message-ID: <11d3fn7$3ks1o$1@dont-email.me>
Path: mbox-mo1.pugleaf.net!news-lax.pugleaf.net!srl.newsdeef.eu!news.hispagatos.org!eternal-september.org!feeder.eternal-september.org!nntp.eternal-september.org!.POSTED!not-for-mail
References: <11bp6d1$16i93$1@dont-email.me> <a8n6elh26hc5cg98pn84idqp7rrel2l47o@4ax.com> <11bvnp8$3ehgg$1@dont-email.me> <11c0065$3hr4g$1@dont-email.me> <39e9elp8cqum5iatg21ltbf06hc4p4dgec@4ax.com> <eig9ellto4nl35n0cd8elct4boi2018mcp@4ax.com> <11ck9s9$2dmvp$1@dont-email.me> <fe8selhl8um5p168shk979cms2elurlhh1@4ax.com> <11cma06$34o3u$2@dont-email.me> <4rbtelp38pp2qnaqha6cq7csbfafpgk9i9@4ax.com> <11cmffm$36ee0$1@dont-email.me> <11cqieb$3h7vq$2@paganini.bofh.team> <11cqnt0$mtaq$1@dont-email.me> <11ctd4b$3rem1$1@paganini.bofh.team> <_QCIS.2$ev2.0@fx08.ams4>

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!news-lax.pugleaf.net!srl.newsdeef.eu!news.hispagatos.org!eternal-september.org!feeder.eternal-september.org!nntp.eternal-september.org!.POSTED!not-for-mail
From: Bill Sloman <bill.sloman@ieee.org>
Newsgroups: sci.electronics.design
Subject: Re: Arms race
Date: Thu, 12 Nov 2026 15:35:41 +1100
Organization: A noiseless patient Spider
Lines: 25
Message-ID: <11d3fn7$3ks1o$1@dont-email.me>
References: <11bp6d1$16i93$1@dont-email.me>
 <a8n6elh26hc5cg98pn84idqp7rrel2l47o@4ax.com> <11bvnp8$3ehgg$1@dont-email.me>
 <11c0065$3hr4g$1@dont-email.me> <39e9elp8cqum5iatg21ltbf06hc4p4dgec@4ax.com>
 <eig9ellto4nl35n0cd8elct4boi2018mcp@4ax.com> <11ck9s9$2dmvp$1@dont-email.me>
 <fe8selhl8um5p168shk979cms2elurlhh1@4ax.com> <11cma06$34o3u$2@dont-email.me>
 <4rbtelp38pp2qnaqha6cq7csbfafpgk9i9@4ax.com> <11cmffm$36ee0$1@dont-email.me>
 <11cqieb$3h7vq$2@paganini.bofh.team> <11cqnt0$mtaq$1@dont-email.me>
 <11ctd4b$3rem1$1@paganini.bofh.team> <_QCIS.2$ev2.0@fx08.ams4>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Date: Thu, 12 Nov 2026 04:35:52 +0000 (UTC)
Injection-Info: dont-email.me;
	logging-data="3829816"; mail-complaints-to="abuse@eternal-september.org";	posting-account="U2FsdGVkX1+GaKYfo7HyaFUERxdb24frWjRBILVCVaE="; posting-host="b90e871a9a47de17f5184d8039f794eb"
User-Agent: Mozilla Thunderbird
Cancel-Lock: sha1:iYPcXT9bBzvZHkCQ2qZ4xQwSpOo= sha256:BXajjSOUU1jaCgTY8zBf0SY/eEEzPpVyvt5fTOw645w=
	sha1:sUjB+RTS5pV6i+gt00OTtrRYRIE= sha256:Nuxqjp1yN5p0HsK01ZMLWtV8Ualgf/5vCzejCPXdphQ=
X-Antivirus: Norton (VPS 261111-6, 12/11/2026), Outbound message
X-Antivirus-Status: Clean
In-Reply-To: <_QCIS.2$ev2.0@fx08.ams4>
Content-Language: en-US