News for hackers. Stuff that matters.
Re:How undefined signed overflow enables optimizations in GCC by phicoh on Monday February 22, 2016 @03:54AM (#11149481)
The problem with the C standard is that most programmers treat C as portable assembler whereas from the beginning the group that wrote the standard tried to make it a proper, abstract high-level language.

So we got an enormous disconnect between what programmers expect and what the language really offers.

For a long time, compilers would side with the programmers making sure that optimisations would not break common idiom.

A number of years gcc left that path. So now, for system code, certainly if the code has to be secure, it is better to avoid gcc.

The C standard is in some areas extremely complex, and it doesn't make sense to expect all programmers to completely understand what is essentially a broken standard.

Re:How undefined signed overflow enables optimizations in GCC by eru on Monday February 22, 2016 @06:53PM (#11155342)
Perhaps we should even leave C as a language for system code. (System code has to be correct and secure first. Optimization for speed comes second, and is only needed for a few small, very hot code paths.)