Why not a warning but when compiling using the -release flag throw an error?<div>Sounds logical to me as unreachable code can be there because of debugging,etc but any released executable should not contain unreachable code.<br>
<br><div class="gmail_quote">2011/8/18 Don <span dir="ltr"><<a href="mailto:nospam@nospam.com">nospam@nospam.com</a>></span><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div><div></div><div class="h5">Timon Gehr wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
On 08/18/2011 02:38 PM, Bernard Helyer wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Faramir on the Ars forums makes an excellent point:<br>
<br>
"With the c preprocessor, both theoretically and as it is used in<br>
practice, you can easily get dead code in certain compile paths that is<br>
live in others."<br>
<br>
I think template mixins can achieve the same sort of shenanigans. I think<br>
warning it is.<br>
</blockquote>
<br>
You mean string mixins?<br>
As string mixins are so much more expressive than C macros, one should actually almost never get trivial dead code in well designed string mixins.<br>
</blockquote>
<br></div></div>
Yes, the equivalent to the C preprocessor is version statements.<br>
Obviously anything wrapped in a version(none) block shouldn't generate an "unreachable code" error...<br>
</blockquote></div><br></div>