Whirlpool / i386


Compiling on i368 (OK for x86_64), the new Whirlpool hash class fails to build…

integer constant is too large for 'long' type

…and Yes, i’m using an old compiler (XCode 3.2) on Snow Leopard ;D

static const uint64 rc[] =
    0x1823c6e887b8014fULL, 0x36a6d2f5796f9152ULL, 

Appending ULL on all the following static numbers as above, it compiles fine on my computer.

Groan.. old compilers. Ok, thanks, I've just given myself RSI wrapping all those literals in some macros, so it should be ok..

I think the issue is not related to old compiler but 32Bits vs 64bits compiling.

It's just that LLVM on OSX do not compiles 32bits code anymore/

ULL should do the trick and is more standard

You say so yourself :)


I mentioned the compiler version as i guess that Jules’s codes successfully pass bunch of hard tests before to be pushed (and such if something is going wrong it must be due to my platform) ;D Personally i use ULL and/or UL everywhere but it seems common to not doing so. Anyway it compiles fine now. Thanks again.

It was nothing to do with 32/64 bit architectures, it's just that the old compiler didn't recognise 64-bit literals without the suffix. All new compilers are fine, but unfortunately old MSVC ones had the opposite problem so adding ULL would break them, hence the tedious addition of a macro as a workaround.

Good to know. Thanks for explanations.