@mathMan
Yes, I do have a C++ compiler, 3 different ones to be exact.
I tested beween gcc, builder and VC++ and all three evaluate the left and right operands fully for a << >> without closures.
the Shl Shr etc in fpc do not, you need to encapsulate the operands for that to happen.
I did put the ntt header and test code in the gcc and it seems to pass. Not sure about VC++ or builder, I didn't try those, just small console test lines.
Also, the __BUILTIN_CTZ in gcc returns 32 for a 0 parameter instead of the 255 or shortInt like Fpc does with the bsfDword for a 0 content.
function TNTT.BUILTIN_CTZ(aValue: U32):Uint32;
begin
Result := bsfDWord(aValue);
if shortint(Result) = -1 then
Result := 32; //GCC's output for a zero value.
end;
That works the same as gcc.
jamie