can you write a DIP for it (even if it's for experimental only for now)?<div>It takes a bit more work, but it gathers all the info in 1 place and incorporate feedback. Right now there are too many scattered threads about that issue.</div>
<div><br></div><div>As I've suggested before, here's what I would want:</div><div><br></div><div>* dmd -check_arithmetic_overflow: not implied by any other flags (including -debug), because conflating flags is bad and it might slow down debug builds too much. So this opt-in flag results in no downspeed, unless user explicitly asks for it (usually when chasing a bug).</div>
<div><br></div><div>* code can query whether the flag is set via version(check_arithmetic_overflow){...}else{...}</div><div><br></div><div>* we need a way to unset the flag in a given scope because pieces of code may rely on intentional overflow, regardless of whether check_arithmetic_overflow was provided. This part is a bit tricky, any ideas? I've proposed this: <a href="http://forum.dlang.org/thread/mailman.835.1370430655.13711.digitalmars-d@puremagic.com#post-mailman.835.1370430655.13711.digitalmars-d:40puremagic.com">http://forum.dlang.org/thread/mailman.835.1370430655.13711.digitalmars-d@puremagic.com#post-mailman.835.1370430655.13711.digitalmars-d:40puremagic.com</a> (scoped compiler options (cf C++ pragma push/pop). Maybe there are other ways?</div>
<div><br></div><div><br></div><div><br></div><div><div><br><div class="gmail_quote">On Tue, Jun 4, 2013 at 11:54 PM, eles <span dir="ltr"><<a href="mailto:eles@eles.com" target="_blank">eles@eles.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Dear all,<br>
<br>
 The question of if the integers should overflow or not by default comes back now and then and latest was in this thread: <a href="http://forum.dlang.org/thread/mailman.739.1370297482.13711.digitalmars-d-learn@puremagic.com" target="_blank">http://forum.dlang.org/thread/<u></u>mailman.739.1370297482.13711.<u></u>digitalmars-d-learn@puremagic.<u></u>com</a> (and, before you ask, yes, by me).<br>

<br>
 Yes, I am a supporter of this.<br>
<br>
 But I am not sure if it is a good idea or no, although for me should be just like the -noboundscheck compiler flag, ie the runtime overhead will be included only on explicit request.<br>
<br>
 But, while I do not dare asking for the feature to be in the language, could it be added to the compiler, for a while? Even as undocumented feature, for testing by those who would like to.<br>
<br>
 Maybe some branch "experimental" or "throw-away" could be created to this end.<br>
<br>
 After one month of using it people will have their arguments pro or contra supported not only by faith, but also by facts.<br>
<br>
 Then, after one month, if is a bad feature and an undocumented one, silently remove it and, voilà, everything will be just as today is.<br>
<br>
 Thank you.<br>
</blockquote></div><br></div></div>