<html><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div>Hi,</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 10px/normal Monaco; color: rgb(63, 110, 116); "><br></div><div><div>On Jun 23, 2008, at 11:43 AM, Dan Gohman wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div>On Jun 23, 2008, at 10:18 AM, Chris Lattner wrote:<br><span class="Apple-style-span" style="color: rgb(0, 0, 0); "><blockquote type="cite"><div>[Text Deleted]</div></blockquote></span><blockquote type="cite"><blockquote type="cite">+++ llvm/trunk/lib/AsmParser/llvmAsmParser.y Mon Jun  9 09:45:02 2008<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">@@ -2505,6 +2499,80 @@<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">   delete PTy; delete $2;<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">   CHECK_FOR_ERROR<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"> }<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">+  | '[' ConstVector ']' { // Nonempty unsized arr<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">+    const Type *ETy = (*$2)[0]->getType();<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">+    int NumElements = $2->size();<br></blockquote></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">Please use uint64_t for NumElements.<br></blockquote><br>fixed.<br><blockquote type="cite"><br></blockquote></div></blockquote><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 10px/normal Monaco; color: rgb(63, 110, 116); "><font class="Apple-style-span" color="#000000"><br></font></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 10px/normal Monaco; color: rgb(63, 110, 116); "><font class="Apple-style-span" color="#000000"><font class="Apple-style-span" face="Helvetica" size="3"><span class="Apple-style-span" style="font-size: 12px;">Quick question about the change.  When the NumElements changed to uint64_t, we started</span></font></font></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 10px/normal Monaco; color: rgb(63, 110, 116); "><font class="Apple-style-span" color="#000000"><font class="Apple-style-span" face="Helvetica" size="3"><span class="Apple-style-span" style="font-size: 12px;">to have code that looks like</span></font></font></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 10px/normal Monaco; color: rgb(63, 110, 116); "><span style="color: rgb(0, 0, 0); ">   </span><span style="color: rgb(92, 38, 153); ">uint64_t</span><span style="color: rgb(0, 0, 0); "> </span>NumElements<span style="color: rgb(0, 0, 0); "> = </span>ATy<span style="color: rgb(0, 0, 0); ">-></span><span style="color: rgb(46, 13, 110); ">getNumElements</span><span style="color: rgb(0, 0, 0); ">();</span></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 10px/normal Monaco; color: rgb(0, 116, 0); "><span style="color: rgb(0, 0, 0); ">   </span>// Verify that we have the correct size...</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 10px/normal Monaco; ">   <span style="color: rgb(170, 13, 145); ">if</span> (<span style="color: rgb(63, 110, 116); ">NumElements</span> != -<span style="color: rgb(28, 0, 207); ">1</span> && <span style="color: rgb(63, 110, 116); ">NumElements</span> != (<span style="color: rgb(170, 13, 145); ">int</span>)$<span style="color: rgb(28, 0, 207); ">3</span>-><span style="color: rgb(46, 13, 110); ">size</span>())</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 10px/normal Monaco; "><font class="Apple-style-span" face="Helvetica" size="3"><span class="Apple-style-span" style="font-size: 12px;"><br></span></font></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 10px/normal Monaco; "><font class="Apple-style-span" face="Helvetica" size="3"><span class="Apple-style-span" style="font-size: 12px;">The code doesn't look quite right (though it is functionally correct)  with int64_t with a value cast to int and a negative number.  The compiler will also generating a warning because we are comparing signed and unsigned.  Should we get rid of this warning by explicitly casting to uint64_t instead?</span></font></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 10px/normal Monaco; "><font class="Apple-style-span" face="Helvetica" size="3"><br></font></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 10px/normal Monaco; "><font class="Apple-style-span" face="Helvetica" size="3"><span class="Apple-style-span" style="font-size: 12px;">  -- Mon Ping</span></font></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 10px/normal Monaco; "><br></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 10px/normal Monaco; "><br></div><div><font class="Apple-style-span" face="Monaco" size="2"><span class="Apple-style-span" style="font-size: 10px;"><br></span></font></div></div></body></html>