I agree, it would be nice to have diagnostics for implementation defined behavior as well.<div><br></div><div>However, it seems like there would be some degree of overlap. For example, we already</div><div>have -fsanitize=shift, which, I believe, technically checks implementation defined,</div>

<div>rather than undefined behavior (language lawyers feel free to correct me).</div><div><br></div><div>I think it could be very interesting to check some behaviors not covered</div><div>in the sanitizers statically. Do you have thoughts about static versus dynamic</div>

<div>checking?</div><div><br></div><div>Adam</div><div><br><div class="gmail_quote">On Wed, Apr 10, 2013 at 5:40 PM, Jeffrey Walton <span dir="ltr"><<a href="mailto:noloader@gmail.com" target="_blank">noloader@gmail.com</a>></span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="im">On Wed, Apr 10, 2013 at 5:07 PM, Adam Schnitzer <<a href="mailto:adamschn@umich.edu">adamschn@umich.edu</a>> wrote:<br>


> John and Sean,<br>
><br>
> Thank you very much for the feedback. I have a better idea of scope and<br>
> where to focus.<br>
><br>
> John, I think you're absolutely right, with -fsanitize=undefined and others,<br>
> more behavior is being caught at runtime/compile time. I will start working<br>
> on a list of behaviors for which no diagnostics currently exist, and select<br>
> a subset to focus on.<br>
</div>My apologies for stepping in and bike shedding: I would really enjoy<br>
something for 'implementation defined' behaviors also. Its not always<br>
portable, and I find it to be a key indicator of code quality.<br>
<br>
Perhaps another switch would be in order(-fsanitzie=implementation)?<br>
<br>
Jeff<br>
<div class="HOEnZb"><div class="h5"><br>
> On Wed, Apr 10, 2013 at 1:54 PM, John Regehr <<a href="mailto:regehr@cs.utah.edu">regehr@cs.utah.edu</a>> wrote:<br>
>>><br>
>>> I would like to work on improving support for C++ in the static analyzer.<br>
>>> Specifically, I think it<br>
>>> would be valuable to improve the checkers for undefined behavior<br>
>>> including those already suggested.<br>
>><br>
>><br>
>> I'd be happy to provide feedback on a more specific version of this part<br>
>> of the proposal.<br>
>><br>
>> In particular, a useful starting point (maybe this already exists?) would<br>
>> be a list of all C/C++ undefined behaviors broken down by whether<br>
>> Clang/LLVM...<br>
>><br>
>> - can reliably provide a compile-time diagnostic<br>
>><br>
>> - can reliably provide a runtime diagnostic<br>
>><br>
>> - cannot provide any diagnostic, but implements a predictable behavior<br>
>><br>
>> - cannot provide any diagnostic and also implements unpredictable behavior<br>
>><br>
>> Obviously the last category is the interesting place for future work.<br>
</div></div></blockquote></div><br></div>