[cfe-commits] Fwd: Patch for packed enums

Edward O'Callaghan eocallaghan at auroraux.org
Sat Aug 8 07:37:19 PDT 2009


Applied 78471.

Thank you,
Edward.

2009/8/8 Anders Johnsen <skabet at gmail.com>:
> 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
>
>
> _______________________________________________
> cfe-commits mailing list
> cfe-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
>
>



-- 
-- 
Edward O'Callaghan
http://www.auroraux.org/
eocallaghan at auroraux dot org




More information about the cfe-commits mailing list