Re:Inter-Procedural Optimization and Derefinement
by legulere on Sunday July 17, 2016 @08:32PM
(#12112609)
is undefined behaviour. The compiler can replace it with anything it wants. Like for instance a return true. Compilers usually (ab-)use this to remove branches.
[ Parent
| on HN ]
Re:Inter-Procedural Optimization and Derefinement
by adrianratnapala on Monday July 18, 2016 @12:30AM
(#12113225)
No need to for parentheses around "ab" in abuse. This is just bad behaviour from compilers trying to optimise for benchmarks.
The right thing to do is to issue an error or warning, and then not make absurd assumptions about other variables. A good explanation of all this can be found here: http://c9x.me/compile/bib/ubc.pdf