Groups | Search | Server Info | Login | Register


Groups > comp.lang.c > #398908

Re: Safety of casting from 'long' to 'int'

From Tim Rentsch <tr.17687@z991.linuxsc.com>
Newsgroups comp.lang.c
Subject Re: Safety of casting from 'long' to 'int'
Date 2026-05-13 15:28 -0700
Organization A noiseless patient Spider
Message-ID <86ik8rj65t.fsf@linuxsc.com> (permalink)
References (1 earlier) <10thb36$1prnt$1@kst.eternal-september.org> <10tlc73$qq2$1@reader1.panix.com> <86lddnlvtr.fsf@linuxsc.com> <10u26f0$t9e$1@reader1.panix.com> <10u2hmc$2t96p$3@kst.eternal-september.org>

Show all headers | View raw


Keith Thompson <Keith.S.Thompson+u@gmail.com> writes:

> cross@spitfire.i.gajendra.net (Dan Cross) writes:
>
>> In article <86lddnlvtr.fsf@linuxsc.com>,
>> Tim Rentsch  <tr.17687@z991.linuxsc.com> wrote:
>
> [...]
>
>>> Starting in C99, any mention of interrupts and signal handlers was
>>> removed, along with the carveout.
>>
>> This is wrong.  Section 7.14 of C23 talks about signals and
>> signal handlers at length.
>
> Obviously, but that's clearly not what Tim meant.  His statement
> was not wrong in context.  (7.14 describes <signal.h>.  It's not
> plausible that Tim would think that had been removed.)
>
>> I never mentioned "interrupts" at all (traditionally, Unix
>> signals, which formed the basis for C signals, are not
>> interrputs in the conventional sense.  Modern systems will
>> sometimes make use of interprocessor-interrupts to hasten their
>> delivery, however).
>>
>> I think you are talking about _only_ the description of
>> `longjmp`.  I am actually talking about the standard considered
>> in total.  I only mentioned "non-nested" signal handler because
>> C90 was explicit in saying that that `longjmp` from a _nested_
>> signal handler was UB.
>
> Yes, Tim was clearly talking only about the descrition of longjmp.
> His statement wasn't wrong, just restricted to a certain context.
> C90's description of of longjmp includes a paragraph about interrupts
> and signals.  C99 removed that paragraph.

Right.  Thank you for clarifying.

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


Thread

Re: Safety of casting from 'long' to 'int' cross@spitfire.i.gajendra.net (Dan Cross) - 2026-05-07 01:39 +0000
  Re: Safety of casting from 'long' to 'int' Tim Rentsch <tr.17687@z991.linuxsc.com> - 2026-05-06 21:41 -0700
    Re: Safety of casting from 'long' to 'int' cross@spitfire.i.gajendra.net (Dan Cross) - 2026-05-08 18:26 +0000
      Re: Safety of casting from 'long' to 'int' Tim Rentsch <tr.17687@z991.linuxsc.com> - 2026-05-08 15:41 -0700
  Re: Safety of casting from 'long' to 'int' Keith Thompson <Keith.S.Thompson+u@gmail.com> - 2026-05-06 23:22 -0700
    Re: Safety of casting from 'long' to 'int' cross@spitfire.i.gajendra.net (Dan Cross) - 2026-05-08 19:06 +0000
      Re: Safety of casting from 'long' to 'int' "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> - 2026-05-08 13:22 -0700
        Re: Safety of casting from 'long' to 'int' "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> - 2026-05-08 13:27 -0700
      Re: Safety of casting from 'long' to 'int' Tim Rentsch <tr.17687@z991.linuxsc.com> - 2026-05-12 22:31 -0700
        Re: Safety of casting from 'long' to 'int' cross@spitfire.i.gajendra.net (Dan Cross) - 2026-05-13 15:47 +0000
          Re: Safety of casting from 'long' to 'int' Keith Thompson <Keith.S.Thompson+u@gmail.com> - 2026-05-13 11:59 -0700
            Re: Safety of casting from 'long' to 'int' cross@spitfire.i.gajendra.net (Dan Cross) - 2026-05-13 20:45 +0000
            Re: Safety of casting from 'long' to 'int' Tim Rentsch <tr.17687@z991.linuxsc.com> - 2026-05-13 15:28 -0700
          Re: Safety of casting from 'long' to 'int' Tim Rentsch <tr.17687@z991.linuxsc.com> - 2026-05-13 15:33 -0700
            Re: Safety of casting from 'long' to 'int' cross@spitfire.i.gajendra.net (Dan Cross) - 2026-05-13 23:56 +0000
  Re: Safety of casting from 'long' to 'int' David Brown <david.brown@hesbynett.no> - 2026-05-07 10:33 +0200
  Re: Safety of casting from 'long' to 'int' James Kuyper <jameskuyper@alumni.caltech.edu> - 2026-05-07 18:08 -0400
    Re: Safety of casting from 'long' to 'int' cross@spitfire.i.gajendra.net (Dan Cross) - 2026-05-08 16:13 +0000
      Re: Safety of casting from 'long' to 'int' scott@slp53.sl.home (Scott Lurndal) - 2026-05-08 16:42 +0000
        Re: Safety of casting from 'long' to 'int' Lew Pitcher <lew.pitcher@digitalfreehold.ca> - 2026-05-08 16:57 +0000
          Re: Safety of casting from 'long' to 'int' James Kuyper <jameskuyper@alumni.caltech.edu> - 2026-05-08 17:51 -0400
            Re: Safety of casting from 'long' to 'int' cross@spitfire.i.gajendra.net (Dan Cross) - 2026-05-08 23:03 +0000
      Re: Safety of casting from 'long' to 'int' scott@slp53.sl.home (Scott Lurndal) - 2026-05-08 17:01 +0000
      Re: Safety of casting from 'long' to 'int' Tim Rentsch <tr.17687@z991.linuxsc.com> - 2026-05-09 08:37 -0700
        Re: Safety of casting from 'long' to 'int' cross@spitfire.i.gajendra.net (Dan Cross) - 2026-05-09 22:15 +0000
          Re: Safety of casting from 'long' to 'int' Keith Thompson <Keith.S.Thompson+u@gmail.com> - 2026-05-09 16:24 -0700

csiph-web