<div dir="ltr">How do you think this should be handled? Assertion error?</div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Jun 2, 2016 at 10:10 PM, John Regehr <span dir="ltr"><<a href="mailto:regehr@cs.utah.edu" target="_blank">regehr@cs.utah.edu</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class=""><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
 /// Gets the maximum value for a N-bit unsigned integer.<br>
-inline uint64_t maxUIntN(uint64_t N) { return UINT64_C(1) << N; }<br>
+inline uint64_t maxUIntN(uint64_t N) { return (UINT64_C(1) << N) - 1; }<br>
</blockquote>
<br></span>
This is still wrong unless N is guaranteed to be no greater than 63.<span class="HOEnZb"><font color="#888888"><br>
<br>
John<br>
</font></span></blockquote></div><br></div>