<html>
<head>
<base href="http://bugzilla.gdcproject.org/">
</head>
<body>
<p>
<div>
<b><a class="bz_bug_link
bz_status_NEW "
title="NEW - _d_throw is not treated as `noreturn`."
href="http://bugzilla.gdcproject.org/show_bug.cgi?id=207#c6">Comment # 6</a>
on <a class="bz_bug_link
bz_status_NEW "
title="NEW - _d_throw is not treated as `noreturn`."
href="http://bugzilla.gdcproject.org/show_bug.cgi?id=207">bug 207</a>
from <span class="vcard"><a class="email" href="mailto:art.08.09@gmail.com" title="art.08.09@gmail.com">art.08.09@gmail.com</a>
</span></b>
<pre>(In reply to Iain Buclaw from <a href="show_bug.cgi?id=207#c5">comment #5</a>)
<span class="quote">> As for assert(0) in non-release code, it is still possible to catch it, so
> there's not much in the way of optimising around that. :-)</span >
It's not about catching -- marking it as noreturn doesn't affect
catching, just return/recovery. `assert(0)` is sufficiently special
in D that the compiler already complains when it finds reachable
code following such an assert:
void f() {
assert(0);
f(); // warning: statement is not reachable
}
<span class="quote">> I can have a look, but as far as I recall, gcc optimizer should treat it as
> noreturn. Whether or not noreturn implies that everything in scope
> afterwards is unreachable depends the optimizer too.</span >
My guess is the calls are not treated as @noreturn, but, since gdc
dropped support for most gcc attributes, verifying this by wrapping
the calls is currently impossible...</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are watching all bug changes.</li>
</ul>
</body>
</html>