News for hackers. Stuff that matters.
Re:Ask HN: Why C happily allows numeric overflows instead of... by ttyprintk on Friday February 03, 2023 @05:15AM (#34639397)
Excellent. To answer OPs question: on some hardware, you cannot distinguish between an overflow and some other fault. On systems without this limitation, you might include a model-specific header and look at a particular bit in flags to find the carry. I presume there are architectures, maybe with a math coprocessor, where nabbing those flags requires an interrupt.

Asking the language to define math around each of those is actually less portable.

There are no comments on this comment yet.