[openssl-dev] [openssl.org #4422] OS X 32-bit PowerPC: blake2b.c:27: warning: integer constant is too large for 'unsigned long' type

Jeffrey Walton noloader at gmail.com
Sun Mar 13 11:27:19 UTC 2016


>> static const uint64_t blake2b_IV[8] =
>> {
>>     0x6a09e667f3bcc908U, 0xbb67ae8584caa73bU,
>>     0x3c6ef372fe94f82bU, 0xa54ff53a5f1d36f1U,
>>     0x510e527fade682d1U, 0x9b05688c2b3e6c1fU,
>>     0x1f83d9abfb41bd6bU, 0x5be0cd19137e2179U
>> };
>>
>> I've run into this before, but in C++. I think you need ULL, and not
>> U. But I don't know if it will adversely affect other compilers and
>> platforms.
>
> So I guess where in the situation where "U" is not supported by
> some compilers and "ULL" not by others, where both should be
> valid.

I'm guessing GCC 4.0.1 is using an intermediate 32-bit value when it
encounters the U. Its triggering a warning, but its not causing a
failure of the self test (presuming there's good code coverage).

Also see http://gcc.gnu.org/onlinedocs/gcc/Long-Long.html.

Jeff


More information about the openssl-dev mailing list