This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/29580] integer -2147483648 out of range: bug or feature?
- From: "kloedej at knmi dot nl" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 31 Oct 2006 08:25:20 -0000
- Subject: [Bug fortran/29580] integer -2147483648 out of range: bug or feature?
- References: <bug-29580-11277@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- 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