tmp/tmpe35iwiwd/{from.md → to.md}
RENAMED
|
@@ -8,19 +8,21 @@ declaration of that function specifies the `noreturn` attribute. If a
|
|
| 8 |
function is declared with the `noreturn` attribute in one translation
|
| 9 |
unit and the same function is declared without the `noreturn` attribute
|
| 10 |
in another translation unit, the program is ill-formed, no diagnostic
|
| 11 |
required.
|
| 12 |
|
| 13 |
-
If a function `f` is
|
| 14 |
-
`noreturn` attribute and
|
| 15 |
-
undefined.
|
| 16 |
|
| 17 |
-
[*Note 1*: The function
|
| 18 |
exception. — *end note*]
|
| 19 |
|
| 20 |
*Recommended practice:* Implementations should issue a warning if a
|
| 21 |
-
function marked `[[noreturn]]` might return.
|
|
|
|
|
|
|
| 22 |
|
| 23 |
[*Example 1*:
|
| 24 |
|
| 25 |
``` cpp
|
| 26 |
[[ noreturn ]] void f() {
|
|
|
|
| 8 |
function is declared with the `noreturn` attribute in one translation
|
| 9 |
unit and the same function is declared without the `noreturn` attribute
|
| 10 |
in another translation unit, the program is ill-formed, no diagnostic
|
| 11 |
required.
|
| 12 |
|
| 13 |
+
If a function `f` is invoked where `f` was previously declared with the
|
| 14 |
+
`noreturn` attribute and that invocation eventually returns, the
|
| 15 |
+
behavior is runtime-undefined.
|
| 16 |
|
| 17 |
+
[*Note 1*: The function can terminate by throwing an
|
| 18 |
exception. — *end note*]
|
| 19 |
|
| 20 |
*Recommended practice:* Implementations should issue a warning if a
|
| 21 |
+
function marked `[[noreturn]]` might return. The value of a
|
| 22 |
+
*has-attribute-expression* for the `noreturn` attribute should be `0`
|
| 23 |
+
unless the implementation can issue such warnings.
|
| 24 |
|
| 25 |
[*Example 1*:
|
| 26 |
|
| 27 |
``` cpp
|
| 28 |
[[ noreturn ]] void f() {
|