Tried adding it to the existing array-bounds-ptr-arith.cpp but that didn't work because the diagnostic about void pointer arithmetic was triggering instead. Went to lunch shortly after committing the fix and remembered while at lunch that pointer arithmetic with void* is disallowed in C++ but not C, so am adding the test case now. ;)<br>
<br><div class="gmail_quote">On Wed, Aug 10, 2011 at 11:53 AM, Chandler Carruth <span dir="ltr"><<a href="mailto:chandlerc@google.com">chandlerc@google.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="gmail_quote">On Wed, Aug 10, 2011 at 2:49 PM, Kaelyn Uhrain <span dir="ltr"><<a href="mailto:rikka@google.com" target="_blank">rikka@google.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

Make sure ptrarith_typesize is at least 1 to avoid division by zero</blockquote></div><br><div>Testcase?</div>
</blockquote></div><br>