Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Corrected UB number and link.

If control reaches the end closing curly brace ('}') of a non-void function without evaluating a return statement, using the return value of the function call causes undefined behavior. See also undefined behavior 7 of Appendix J82 in Annex J.2.

This rule is related to recommendation MSC01-C. Strive for logical completeness because both rules practices are intended to ensure that programs properly handle all possible conditions.

...