News for hackers. Stuff that matters.
Re:Boringcc: Proposal for a C compiler for secure software by ChuckMcM on Monday December 21, 2015 @03:18PM (#10773217)
But that is the thing, undefined behavior just says that the compiler takes no position on what should happen. So a boring compiler that refuses to compile code which would have undefined behavior is sufficient. It makes idomatic C a bit more challenging but if you've read through Dan's code you know that he's all about picking a style and sticking with it. And for that set of constraints, its all defined (and boring because there is very little, if any, optimization going on insider the compiler)

So sub-optimal but predictable and safe code given that you change the preference bit to safety over speed.

Re:Boringcc: Proposal for a C compiler for secure software by ProblemFactory on Tuesday December 22, 2015 @10:50AM (#10778363)
A lot of undefined behaviour cannot be identified at compile time. For example, adding two signed integers is undefined if it overflows, but perfectly well defined if it does not.

A safe compiler will have to add checks to guard against undefined behaviour happening at runtime.