[Bug 207] New: _d_throw is not treated as `noreturn`.
via D.gnu
d.gnu at puremagic.com
Fri Jan 8 22:09:11 PST 2016
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: ibuclaw at gdcproject.org
Reporter: art.08.09 at gmail.com
`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.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.puremagic.com/pipermail/d.gnu/attachments/20160109/2cbf19c6/attachment.html>
More information about the D.gnu
mailing list