[cfe-commits] Fwd: Patch for packed enums
Anders Johnsen
skabet at gmail.com
Sat Aug 8 04:31:43 PDT 2009
Forgot to cc mailing list:
---------- Forwarded message ----------
Hi,
On Sat, Aug 1, 2009 at 22:06, Eli Friedman <eli.friedman at gmail.com> wrote:
> Sorry for the delay.
No worry :)
>
>
> + // If it's packed, check if it fits a char or short.
> + if (Packed && NumNegativeBits <= CharWidth && NumPositiveBits <
> CharWidth) {
> + BestType = Context.SignedCharTy;
> + BestWidth = CharWidth;
> + } else if (Packed && NumNegativeBits <= ShortWidth &&
> NumPositiveBits < ShortWidth) {
> + BestType = Context.ShortTy;
> + BestWidth = ShortWidth;
> + }
> // If there is a negative value, figure out the smallest integer type
> (of
> // int/long/longlong) that fits.
> - if (NumNegativeBits <= IntWidth && NumPositiveBits < IntWidth) {
> + else if (NumNegativeBits <= IntWidth && NumPositiveBits < IntWidth) {
>
> Having a comment in the middle of the if statement is a bit awkward;
> it would be nice to merge the two comments.
Yeah, should be fixed now.
Otherwise, looks fine.
>
Yay!
>
> -Eli
>
> On Sat, Aug 1, 2009 at 12:26 PM, Anders Johnsen<skabet at gmail.com> wrote:
> > Bump :)
> >
> > On Sun, Jul 26, 2009 at 23:52, Anders Johnsen <skabet at gmail.com> wrote:
> >>
> >> Hi,
> >>
> >> This patch should implement packed enums (PR4098).
> >>
> >> - Anders
> >
> >
> > _______________________________________________
> > cfe-commits mailing list
> > cfe-commits at cs.uiuc.edu
> > http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
> >
> >
>
- Anders
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20090808/0f4d2239/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: enum_patch.diff
Type: text/x-diff
Size: 6709 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20090808/0f4d2239/attachment.diff>
More information about the cfe-commits
mailing list