News for hackers. Stuff that matters.
Re:Emulating exceptions in C: a case study by zvrba on Thursday August 27, 2015 @06:17AM (#10128518)
> longjmp() and setjmp() are tricky. They’re obscure, can give rise to subtle bugs, are highly platform-specific, and, if abused, will probably lead to awfully confusing code

Actually, being part of the ISO C standard, they are not platform-specific. Otherwise, just use C++ where destructors take care of cleanup when an exception is thrown.

Re:Emulating exceptions in C: a case study by pjmlp on Thursday August 27, 2015 @09:28AM (#10129197)
> Actually, being part of the ISO C standard, they are not platform-specific.

The standard doesn't define the full semantics, specially what happens when a signal, trap, OS exception and similar occurs.

Re:Emulating exceptions in C: a case study by amelius on Thursday August 27, 2015 @06:25AM (#10128548)
Perhaps use them in production code only (where performance is critical), and use something else in debug/development mode?