I want to declare an integer parameter based on its hexadecimal representation. What are the differences between:
INTEGER(kind=int32), PARAMETER :: a = Z'FFFFFFFF'
INTEGER(kind=int32), PARAMETER :: b = int(Z'FFFFFFFF', kind=int32)
INTEGER(kind=int32), PARAMETER :: c = transfer(Z'FFFFFFFF', 1_int32)
(And yes, I know that this is just -1.)
gfortran seems to give me an integer overflow error during compile (helpfully telling me that I can ignore that with -fno-range-check) for the above a and b, but not for c.
I need to make it Fortran 2003 compliant, as this code might be compiled with different compilers elsewhere.