SizeOf(NativeUint) would work a lot better and even with the current compiler. (and works at compile time)
begin
writeln (SizeOf(NativeUint)*8)
end.
All versions tested....<grumpy mode
>
For freaks: of course not complete because it assumes 8 bits per byte....... But anything you throw at it in FreePascal works...