Whirlpool / i386


#1

Hi,

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.


#2

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


#3

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 :)

http://www.juce.com/forum/topic/unsigned-variant-literal64bit


#4

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.


#5

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.


#6

Good to know. Thanks for explanations.