Groups | Search | Server Info | Keyboard shortcuts | Login | Register
Groups > comp.lang.c > #398905
| From | cross@spitfire.i.gajendra.net (Dan Cross) |
|---|---|
| Newsgroups | comp.lang.c |
| Subject | Re: Safety of casting from 'long' to 'int' |
| Date | 2026-05-13 20:45 +0000 |
| Organization | PANIX Public Access Internet and UNIX, NYC |
| Message-ID | <10u2ntn$8ob$1@reader1.panix.com> (permalink) |
| References | <10su8cn$am9i$1@dont-email.me> <86lddnlvtr.fsf@linuxsc.com> <10u26f0$t9e$1@reader1.panix.com> <10u2hmc$2t96p$3@kst.eternal-september.org> |
In article <10u2hmc$2t96p$3@kst.eternal-september.org>, Keith Thompson <Keith.S.Thompson+u@gmail.com> wrote: >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. Sorry, but it wasn't at all clear to me. >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 disagree. The actual context was whether `longjmp` from a signal handler is UB or not. His statement was either unrelated or incorrect. >> 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. Yes, that is a simple matter of fact. But by itself it is only tangentially related to the topic at hand. At best, his response was a non-sequitur. At a minimum, he failed to properly understand the context before replying. - Dan C.
Back to comp.lang.c | Previous | Next — Previous in thread | Next in thread | Find similar
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