Re:On C-optimizing compilers removing code that has undefine...
by pornel on Saturday June 17, 2017 @07:04AM
(#14575305)
It is disallowed by the standard.
It's not disallowed by compilers, because they're deficient. In this case I'd guess compiler front-end doesn't track which values in an array are initialized, and when optimizing back-end sees UB it's too late to emit an error.
It's not disallowed by compilers, because they're deficient. In this case I'd guess compiler front-end doesn't track which values in an array are initialized, and when optimizing back-end sees UB it's too late to emit an error.