Forgot to cc mailing list:<br><br><div class="gmail_quote">---------- Forwarded message ----------<br><br>Hi,<br><br><div class="gmail_quote">On Sat, Aug 1, 2009 at 22:06, Eli Friedman <span dir="ltr"><<a href="mailto:eli.friedman@gmail.com" target="_blank">eli.friedman@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="border-left:1px solid rgb(204, 204, 204);margin:0pt 0pt 0pt 0.8ex;padding-left:1ex">
Sorry for the delay.</blockquote><div>No worry :) <br></div><div class="im"><blockquote class="gmail_quote" style="border-left:1px solid rgb(204, 204, 204);margin:0pt 0pt 0pt 0.8ex;padding-left:1ex"><br>
<br>
+    // If it's packed, check if it fits a char or short.<br>
+    if (Packed && NumNegativeBits <= CharWidth && NumPositiveBits <<br>
CharWidth) {<br>
+        BestType = Context.SignedCharTy;<br>
+        BestWidth = CharWidth;<br>
+    } else if (Packed && NumNegativeBits <= ShortWidth &&<br>
NumPositiveBits < ShortWidth) {<br>
+        BestType = Context.ShortTy;<br>
+        BestWidth = ShortWidth;<br>
+    }<br>
     // If there is a negative value, figure out the smallest integer type (of<br>
     // int/long/longlong) that fits.<br>
-    if (NumNegativeBits <= IntWidth && NumPositiveBits < IntWidth) {<br>
+    else if (NumNegativeBits <= IntWidth && NumPositiveBits < IntWidth) {<br>
<br>
Having a comment in the middle of the if statement is a bit awkward;<br>
it would be nice to merge the two comments.</blockquote><div> </div></div><div>Yeah, should be fixed now. <br><br></div><blockquote class="gmail_quote" style="border-left:1px solid rgb(204, 204, 204);margin:0pt 0pt 0pt 0.8ex;padding-left:1ex">


Otherwise, looks fine.<br>
</blockquote><div><br>Yay! <br></div><div class="im"><blockquote class="gmail_quote" style="border-left:1px solid rgb(204, 204, 204);margin:0pt 0pt 0pt 0.8ex;padding-left:1ex"><br>
-Eli<br>
<div><div></div><div><br>
On Sat, Aug 1, 2009 at 12:26 PM, Anders Johnsen<<a href="mailto:skabet@gmail.com" target="_blank">skabet@gmail.com</a>> wrote:<br>
> Bump :)<br>
><br>
> On Sun, Jul 26, 2009 at 23:52, Anders Johnsen <<a href="mailto:skabet@gmail.com" target="_blank">skabet@gmail.com</a>> wrote:<br>
>><br>
>> Hi,<br>
>><br>
>> This patch should implement packed enums (PR4098).<br>
>><br>
>> - Anders<br>
><br>
><br>
</div></div>> _______________________________________________<br>
> cfe-commits mailing list<br>
> <a href="mailto:cfe-commits@cs.uiuc.edu" target="_blank">cfe-commits@cs.uiuc.edu</a><br>
> <a href="http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits</a><br>
><br>
><br>
</blockquote></div></div><font color="#888888"><br>- Anders<br>
</font></div><br>