Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.c > #168669

Re: Christmas Quiz 2022

Path csiph.com!news.mixmin.net!eternal-september.org!reader01.eternal-september.org!.POSTED!not-for-mail
From Keith Thompson <Keith.S.Thompson+u@gmail.com>
Newsgroups comp.lang.c
Subject Re: Christmas Quiz 2022
Date Tue, 27 Dec 2022 13:53:55 -0800
Organization None to speak of
Lines 33
Message-ID <87pmc4pl70.fsf@nosuchdomain.example.com> (permalink)
References <tnnspa$27vkp$1@paganini.bofh.team> <354067d8-9199-4090-b6c5-68910515d642n@googlegroups.com> <5a4dcd63-491a-ca9a-a742-06c5b974935e@niles.xyz> <toeg4e$3jg3c$1@dont-email.me> <hKEqL.192831$8_id.78861@fx09.iad>
MIME-Version 1.0
Content-Type text/plain
Injection-Info reader01.eternal-september.org; posting-host="0af59a5445f55bd00f3cbbbd179e58cb"; logging-data="3923378"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+WwlXxxr9ZCNc7N2FboY8p"
User-Agent Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux)
Cancel-Lock sha1:S6cM25URUpIs7R+e46S7riRF1hE= sha1:n6xC06P0Midh4TTClMU8rRG2WYA=
Xref csiph.com comp.lang.c:168669

Show key headers only | View raw


scott@slp53.sl.home (Scott Lurndal) writes:
> James Kuyper <jameskuyper@alumni.caltech.edu> writes:
>>On 12/27/22 04:22, Niles Rogoff wrote:
>>> On 12/18/22 13:18, Tony Oliver wrote:
>>>> Signal SIGFPE is raised.
>>> 
>>> What happens to programs running on systems that don't support signals? :^)
>>
>>The only answer that fits all systems is that the behavior is undefined.
>>Singe the FP in SIGFPE stands for floating point, and the question was
>>about dividing an int value by 0, raising SIGFPE seems rather odd, but
>>it's certainly not prohibited.
>
> Notwithstanding the "FP" in the name, SIGFPE isn't specific to floating
> point.   
>
> https://pubs.opengroup.org/onlinepubs/009695399/basedefs/signal.h.html
>
>
> SIGFPE - Erroneous arithmetic operation.

True, but not particularly relevant.  It's true that on *some*
implementations, in some circumstances, integer division by 0 can result
in a SIGFPE (on my system, it does so at optimization levels 0 and 1,
and raises SIGILL at levels 2 and 3, with the simple example I tried).

But the question purported to be about the C language, which does not
define the behavior of integer division by zero.

-- 
Keith Thompson (The_Other_Keith) Keith.S.Thompson+u@gmail.com
Working, but not speaking, for XCOM Labs
void Void(void) { Void(); } /* The recursive call of the void */

Back to comp.lang.c | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Christmas Quiz 2022 Roman P <invalid@example.com> - 2022-12-18 20:00 +0000
  Re: Christmas Quiz 2022 Tony Oliver <guinness.tony@gmail.com> - 2022-12-18 13:18 -0800
    Re: Christmas Quiz 2022 Keith Thompson <Keith.S.Thompson+u@gmail.com> - 2022-12-18 16:48 -0800
    Re: Christmas Quiz 2022 Tim Rentsch <tr.17687@z991.linuxsc.com> - 2022-12-18 17:18 -0800
      Re: Christmas Quiz 2022 "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> - 2022-12-19 19:39 -0800
    Re: Christmas Quiz 2022 Niles Rogoff <eternal-september@niles.xyz> - 2022-12-27 01:22 -0800
      Re: Christmas Quiz 2022 Öö Tiib <ootiib@hot.ee> - 2022-12-27 01:58 -0800
        Re: Christmas Quiz 2022 Keith Thompson <Keith.S.Thompson+u@gmail.com> - 2022-12-27 10:25 -0800
      Re: Christmas Quiz 2022 James Kuyper <jameskuyper@alumni.caltech.edu> - 2022-12-27 05:07 -0500
        Re: Christmas Quiz 2022 scott@slp53.sl.home (Scott Lurndal) - 2022-12-27 16:06 +0000
          Re: Christmas Quiz 2022 scott@slp53.sl.home (Scott Lurndal) - 2022-12-27 17:42 +0000
          Re: Christmas Quiz 2022 Keith Thompson <Keith.S.Thompson+u@gmail.com> - 2022-12-27 13:53 -0800
    Re: Christmas Quiz 2022 Niles Rogoff <eternal-september@niles.xyz> - 2022-12-27 01:24 -0800
      Re: Christmas Quiz 2022 scott@slp53.sl.home (Scott Lurndal) - 2022-12-27 16:07 +0000
  Re: Christmas Quiz 2022 Ben Bacarisse <ben.usenet@bsb.me.uk> - 2022-12-18 21:22 +0000
    Re: Christmas Quiz 2022 Lew Pitcher <lew.pitcher@digitalfreehold.ca> - 2022-12-18 21:40 +0000
    Re: Christmas Quiz 2022 Tim Rentsch <tr.17687@z991.linuxsc.com> - 2022-12-18 17:02 -0800
    Re: Christmas Quiz 2022 Tim Rentsch <tr.17687@z991.linuxsc.com> - 2022-12-18 17:20 -0800
  Re: Christmas Quiz 2022 red floyd <no.spam.here@its.invalid> - 2022-12-18 13:36 -0800
  Re: Christmas Quiz 2022 "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> - 2022-12-18 13:48 -0800
    Re: Christmas Quiz 2022 Siri Cruise <chine.bleu@yahoo.com> - 2022-12-18 14:57 -0800
      Re: Christmas Quiz 2022 "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> - 2022-12-18 15:43 -0800
        Re: Christmas Quiz 2022 Lynn McGuire <lynnmcguire5@gmail.com> - 2022-12-19 23:40 -0600
      Re: Christmas Quiz 2022 "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> - 2022-12-20 14:01 -0800
  Re: Christmas Quiz 2022 Kaz Kylheku <864-117-4973@kylheku.com> - 2022-12-20 13:49 +0000
    Re: Christmas Quiz 2022 Ben Bacarisse <ben.usenet@bsb.me.uk> - 2022-12-20 14:33 +0000
      Re: Christmas Quiz 2022 Lew Pitcher <lew.pitcher@digitalfreehold.ca> - 2022-12-20 14:44 +0000
        Re: Christmas Quiz 2022 Ben Bacarisse <ben.usenet@bsb.me.uk> - 2022-12-20 14:57 +0000
          Re: Christmas Quiz 2022 Lew Pitcher <lew.pitcher@digitalfreehold.ca> - 2022-12-20 15:03 +0000
            Re: Christmas Quiz 2022 David Brown <david.brown@hesbynett.no> - 2022-12-20 16:32 +0100
            Re: Christmas Quiz 2022 Lew Pitcher <lew.pitcher@digitalfreehold.ca> - 2022-12-20 15:41 +0000
              Re: Christmas Quiz 2022 Keith Thompson <Keith.S.Thompson+u@gmail.com> - 2022-12-20 10:22 -0800
                Re: for() syntax (Was: Christmas Quiz 2022) Lew Pitcher <lew.pitcher@digitalfreehold.ca> - 2022-12-20 18:54 +0000
                Re: for() syntax Keith Thompson <Keith.S.Thompson+u@gmail.com> - 2022-12-20 12:08 -0800
                Re: for() syntax (Was: Christmas Quiz 2022) Tim Rentsch <tr.17687@z991.linuxsc.com> - 2022-12-26 06:48 -0800
                Re: Christmas Quiz 2022 Tim Rentsch <tr.17687@z991.linuxsc.com> - 2022-12-26 06:25 -0800
              Re: Christmas Quiz 2022 Tim Rentsch <tr.17687@z991.linuxsc.com> - 2022-12-26 06:24 -0800
                Re: Christmas Quiz 2022 Keith Thompson <Keith.S.Thompson+u@gmail.com> - 2022-12-26 13:05 -0800
  Re: Christmas Quiz 2022 Andrey Tarasevich <andreytarasevich@hotmail.com> - 2022-12-20 12:46 -0800
    Re: Christmas Quiz 2022 Paavo Helde <eesnimi@osa.pri.ee> - 2022-12-20 23:49 +0200
      Re: Christmas Quiz 2022 Andrey Tarasevich <andreytarasevich@hotmail.com> - 2022-12-20 14:00 -0800
        Re: Christmas Quiz 2022 Paavo Helde <eesnimi@osa.pri.ee> - 2022-12-21 00:13 +0200
          Re: Christmas Quiz 2022 Andrey Tarasevich <andreytarasevich@hotmail.com> - 2022-12-20 14:38 -0800
    Re: Christmas Quiz 2022 Andrey Tarasevich <andreytarasevich@hotmail.com> - 2022-12-20 21:31 -0800
      Re: Christmas Quiz 2022 David Brown <david.brown@hesbynett.no> - 2022-12-21 12:02 +0100

csiph-web