This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/30985] New: Misleading error message for -huge(integer)-1
- From: "burnus at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 27 Feb 2007 20:23:37 -0000
- Subject: [Bug fortran/30985] New: Misleading error message for -huge(integer)-1
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
If one inputs a variable which is (-huge(i)-1), gfortran outputs:
i = -2147483648
1
Error: Integer too big for its kind at (1)
This can be very irritating as the number is representable hardware wise, even
if it is not a Fortran number (symmetrically around the zero).
I had a program, which didn't work (PR30981) and thus I used "print *, i"
which showed: -2147483648. It is then very counterintuitive that one cannot
enter the number directly.
Maybe a more explicit error message should be given for (-huge(i)-1). In
addition, maybe one could point to "-fno-range-check"? I know we don't point to
compiler options in error messages so far, but for this case it might make
sense. (Analogously for
data x/too-big-BOZ, overflowing on purpose/.)
[For some errors, I'd also like to see a pointer to -std=legacy as I often
don't realize that it is allowed there.]
--
Summary: Misleading error message for -huge(integer)-1
Product: gcc
Version: 4.3.0
Status: UNCONFIRMED
Keywords: diagnostic
Severity: normal
Priority: P3
Component: fortran
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: burnus at gcc dot gnu dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30985