http://bugzilla.gdcproject.org/show_bug.cgi?id=207
Bug ID: 207
Summary: _d_throw is not treated as `noreturn`.
Product: GDC
Version: development
Hardware: All
OS: All
Status: NEW
Severity: normal
Priority: Normal
Component: gdc
Assignee: [email protected]
Reporter: [email protected]
`throw expr;` is not assumed to never return.
This results in *much* worse codegen, which can be seen by substituting
> { throw expr; import gcc.builtins; __builtin_unreachable(); }
for
> throw expr;
That is not a perfect workaround, as the compiler then warns
about that `builtin_unreachable()` statement being unreachable
(but at least does the right thing and eliminates the unreachable
paths). Using `assert(0)` works, but adds unnecessary bloat (the
dead trap code in release mode).
--
You are receiving this mail because:
You are watching all bug changes.