From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 19749 invoked by alias); 27 Feb 2007 20:23:50 -0000 Received: (qmail 19693 invoked by uid 48); 27 Feb 2007 20:23:37 -0000 Date: Tue, 27 Feb 2007 20:23:00 -0000 Subject: [Bug fortran/30985] New: Misleading error message for -huge(integer)-1 X-Bugzilla-Reason: CC Message-ID: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "burnus at gcc dot gnu dot org" Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org X-SW-Source: 2007-02/txt/msg02985.txt.bz2 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