tmp/tmp25eooscc/{from.md → to.md}
RENAMED
|
@@ -1,22 +1,22 @@
|
|
| 1 |
### Clause [[stmt.stmt]]: statements <a id="diff.stat">[[diff.stat]]</a>
|
| 2 |
|
| 3 |
[[stmt.switch]], [[stmt.goto]] **Change:** It is now invalid to jump
|
| 4 |
past a declaration with explicit or implicit initializer (except across
|
| 5 |
-
entire block not entered) **Rationale:** Constructors used in
|
| 6 |
initializers may allocate resources which need to be de-allocated upon
|
| 7 |
leaving the block. Allowing jump past initializers would require
|
| 8 |
-
complicated
|
| 9 |
-
|
| 10 |
compile-time rule, C++assures that if an initialized variable is in
|
| 11 |
scope, then it has assuredly been initialized. **Effect on original
|
| 12 |
feature:** Deletion of semantically well-defined feature. Semantic
|
| 13 |
transformation. Seldom.
|
| 14 |
|
| 15 |
[[stmt.return]] **Change:** It is now invalid to return (explicitly or
|
| 16 |
implicitly) from a function which is declared to return a value without
|
| 17 |
-
actually returning a value **Rationale:** The caller and callee may
|
| 18 |
assume fairly elaborate return-value mechanisms for the return of class
|
| 19 |
objects. If some flow paths execute a return without specifying any
|
| 20 |
value, the implementation must embody many more complications. Besides,
|
| 21 |
promising to return a value of a given type, and then not returning such
|
| 22 |
a value, has always been recognized to be a questionable practice,
|
|
|
|
| 1 |
### Clause [[stmt.stmt]]: statements <a id="diff.stat">[[diff.stat]]</a>
|
| 2 |
|
| 3 |
[[stmt.switch]], [[stmt.goto]] **Change:** It is now invalid to jump
|
| 4 |
past a declaration with explicit or implicit initializer (except across
|
| 5 |
+
entire block not entered). **Rationale:** Constructors used in
|
| 6 |
initializers may allocate resources which need to be de-allocated upon
|
| 7 |
leaving the block. Allowing jump past initializers would require
|
| 8 |
+
complicated runtime determination of allocation. Furthermore, any use of
|
| 9 |
+
the uninitialized object could be a disaster. With this simple
|
| 10 |
compile-time rule, C++assures that if an initialized variable is in
|
| 11 |
scope, then it has assuredly been initialized. **Effect on original
|
| 12 |
feature:** Deletion of semantically well-defined feature. Semantic
|
| 13 |
transformation. Seldom.
|
| 14 |
|
| 15 |
[[stmt.return]] **Change:** It is now invalid to return (explicitly or
|
| 16 |
implicitly) from a function which is declared to return a value without
|
| 17 |
+
actually returning a value. **Rationale:** The caller and callee may
|
| 18 |
assume fairly elaborate return-value mechanisms for the return of class
|
| 19 |
objects. If some flow paths execute a return without specifying any
|
| 20 |
value, the implementation must embody many more complications. Besides,
|
| 21 |
promising to return a value of a given type, and then not returning such
|
| 22 |
a value, has always been recognized to be a questionable practice,
|