Re:Modern C++ Won't Save Us
by systemBuilder on Tuesday April 23, 2019 @03:41AM
(#19726398)
In the article the compiler noticed that because of the loop iterator reading the array a[i+1] ... under the assumption the program never indexed beyond the end of the array
... The compiler assumed the loop variable was always less than the limit and therefore changed the loop into an infinite loop. This is the insanity of some of the newer compilers which assume your program never performs an undefined behavior. They compile your mildly buggy slightly undefined code into shit*.
[ Parent
| on HN ]
There are no comments on this comment yet.