News for hackers. Stuff that matters.
Re:How expensive is integer-overflow trapping in C++? by higerordermap on Thursday September 24, 2020 @06:33AM (#24577178)
He is saying it should raise an exception which can be caught somewhere up the stack.
Re:How expensive is integer-overflow trapping in C++? by asveikau on Thursday September 24, 2020 @11:14AM (#24579362)
Yes, but I would take minor issue in that I wasn't saying what should happen so much as what the options are given various tradeoffs.

There are programming communities that have criticisms of exceptions and would like to avoid them. I am sympathetic to that. But if you do have exceptions, this is a good candidate. If you don't have exceptions, making integer overflow trap seems problematic. Posix signals may be another solution, with its own problems and ugliness.