[flac-dev] unsigned long long suffix
Erik de Castro Lopo
mle+la at mega-nerd.com
Fri Oct 11 02:41:51 PDT 2013
lvqcl wrote:
> Erik de Castro Lopo wrote:
>
> >> #define FLAC__U64L(x) x##ULL
> >
> > I like that one! If that works in VS2005 and later I see no reason to use
> > anything else.
>
> MSVS 2005 Express compiles the code...
>
> #define FLAC__U64L(x) x##ULL
> int test = FLAC__U64L(0x1234567890);
>
> ... and generates 0 errors, 2 warnings:
> warning C4305: 'initializing' : truncation from 'unsigned __int64' to 'int'
> warning C4309: 'initializing' : truncation of constant value
>
> so it treats 0x1234567890ULL as 'unsigned __int64' constant.
Ok, so MSVS probably does need its own version of this macro.
Erik
--
----------------------------------------------------------------------
Erik de Castro Lopo
http://www.mega-nerd.com/
More information about the flac-dev
mailing list