Re:Depressing and faintly terrifying days for the C standard...
by eddyb on Wednesday May 30, 2018 @03:59PM
(#17191217)
Indeed. Only wanted to point out that their optimizations also rely on UB, so they're bad examples for specifically "optimizing without relying on UB".
Re:Depressing and faintly terrifying days for the C standard...
by umanwizard on Wednesday May 30, 2018 @11:21PM
(#17193723)
> In C any line of code, if care is not taken to use the correct compiler flags, can be a possible source of UB.
What do you mean?
Re:Depressing and faintly terrifying days for the C standard...
by pjmlp on Thursday May 31, 2018 @04:21AM
(#17194814)
You need to turn on all warnings as errors, static analysers and pedantic modes depending how each compiler allows them.
ANSI C11 has 200 documented cases of UB, and each compiler might have additional cases, are you sure you can know all of them by heart while looking at a random line of C code?
In systems like Unisys ClearPath, you can even configure the system such that only admins can execute applications with unsafe blocks.
In C any line of code, if care is not taken to use the correct compiler flags, can be a possible source of UB.