[cfe-dev] MS 128-bit literals don't always have the correct type

David Blaikie dblaikie at gmail.com
Tue Oct 2 08:43:24 PDT 2012


On Mon, Sep 24, 2012 at 11:41 AM, Richard Smith <richard at metafoo.co.uk> wrote:
> Thanks everyone! It seems our current implementation of the i32 suffix is
> incorrect (it should always give a 32-bit integer, even if the suffixed
> value does not fit into 32 bits).

Seems like we might want a warning (I'd like an error, but given that
this is for MSVC compatibility, that's probably not the right route)
when it's overflowing, though.

- David

>
>
> On Mon, Sep 24, 2012 at 11:31 AM, Kim Gräsman <kim.grasman at gmail.com> wrote:
>>
>> On Mon, Sep 24, 2012 at 8:21 PM, Aaron Ballman <aaron at aaronballman.com>
>> wrote:
>> >
>> >> Which version of VS are you on?
>> >
>> > I tried with VS 2012, but am happy to try 2010 or 2008 if it's worth it.
>>
>> I was just curious -- I tried on VS2010 per earlier post with
>> comparable results.
>>
>> It looks like MSVC overall does not allow integer literals larger than
>> 64 bit; 0x1000 0000 0000 0000 0i32 is one nibble too much.
>>
>> - Kim
>
>
>
> _______________________________________________
> cfe-dev mailing list
> cfe-dev at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev
>




More information about the cfe-dev mailing list