Re:A Guide to Undefined Behavior in C and C++ (2010)
by jacoblambda on Sunday November 04, 2018 @12:19PM
(#18376877)
Ada absolutely can tell. Divide by zero throws an exception and buffer overflows are caught by essentially every modern compiler.
Re:A Guide to Undefined Behavior in C and C++ (2010)
by pjmlp on Sunday November 04, 2018 @01:49PM
(#18377409)
Sure it can, but that wasn't the question. Rather what happened to the code I have written.
NDAs make us not able to tell about stuff.
What magic variant of C or C++ compiler are you using that throws errors on buffer corruption, unless you are speaking about using code with debugging mode enabled in production instead of using a proper release build.
Re:A Guide to Undefined Behavior in C and C++ (2010)
by jstimpfle on Sunday November 04, 2018 @12:47PM
(#18377048)
> buffer overflows are caught by essentially every modern compiler.
If you use high-level arrays with bounds-checking, which are not always fast enough, and can become a maintenaince burden. If they should be absolutely secure (like, std::vector isn't - it can be moved behind your back), they also require GC.
Pascal was replaced by Java and C#.