Bug 22389 – noreturn functions are allowed to return normally
Status
RESOLVED
Resolution
FIXED
Severity
major
Priority
P1
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2021-10-15T12:46:04Z
Last change time
2021-10-21T21:39:30Z
Keywords
pull
Assigned to
No Owner
Creator
moonlightsentinel
Comments
Comment #0 by moonlightsentinel — 2021-10-15T12:46:04Z
The following code is accepted despite foo violating the contract of noreturn:
noreturn foo() {}
Comment #1 by dlang-bot — 2021-10-15T13:13:21Z
@MoonlightSentinel created dlang/dmd pull request #13173 "Fix 22389 - Check that noreturn functions don't return normally" fixing this issue:
- Fix 22389 - Check that noreturn functions don't return normally
Such functions are malformed and hence could cause undefined behavior
at the call site.
https://github.com/dlang/dmd/pull/13173
Comment #2 by dlang-bot — 2021-10-16T09:02:33Z
dlang/dmd pull request #13173 "Fix 22389 - Check that noreturn functions don't return normally" was merged into stable:
- 1613545d1978a489e471327de9433b0236017a55 by MoonlightSentinel:
Fix 22389 - Check that noreturn functions don't return normally
Such functions are malformed and hence could cause undefined behavior
at the call site.
https://github.com/dlang/dmd/pull/13173
Comment #3 by dlang-bot — 2021-10-21T21:39:30Z
dlang/dmd pull request #13209 "Merge stable into master" was merged into master:
- ae8b0e008805bf575eefdacf4faef7114532b3fb by Florian:
Fix 22389 - Check that noreturn functions don't return normally (#13173)
Such functions are malformed and hence could cause undefined behavior
at the call site.
https://github.com/dlang/dmd/pull/13209