Sat.Feb 12, 2022

Remove -code
article thumbnail

Undefined Behavior Due to the Absence of a Return

DZone

It's a perfect example of how wrong code can crash one day, even though it could work for many years. We inspect an error pattern that the SEI CERT C++ coding standard describes as MSC52-CPP. The absence of the return statement in a value-returning function leads to undefined behavior.

C++ 245