Affected subclause: [stmt.return]
Change: It is now invalid to return (explicitly or implicitly) from a function which is
declared to return a value without actually returning a value
. Rationale: The caller and callee may assume fairly elaborate
return-value mechanisms for the return of class objects
. If
some flow paths execute a return without specifying any value,
the implementation must embody many more complications
. Besides,
promising to return a value of a given type, and then not returning
such a value, has always been recognized to be a questionable
practice, tolerated only because very-old C had no distinction between
functions with
void and
int return types
. Effect on original feature: Deletion of semantically well-defined feature
. Difficulty of converting: Semantic transformation
. Add an appropriate return value to the source code, such as zero
. For several years, many existing C implementations have produced warnings in
this case
.