This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug fortran/29580] integer -2147483648 out of range: bug or feature?



------- Comment #6 from kloedej at knmi dot nl  2006-10-31 08:25 -------
A short additional remark on this item:
I just learned (thanks to Paul Poli) that the NAGware f95 compiler does behave
in the same way as gfortran, i.e. refusing to compile the constant -2147483648
in:

integer(KIND=4) :: i
i=-2147483648

an alternative formulation for the mentioned simple workaround (not using
huge()) that does work for all compilers I know is:

integer(KIND=4) :: i
i=-2147483647 -1 


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29580


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]