From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 8580 invoked by alias); 10 Mar 2010 17:17:45 -0000 Received: (qmail 8309 invoked by uid 48); 10 Mar 2010 17:17:15 -0000 Date: Wed, 10 Mar 2010 17:17:00 -0000 Message-ID: <20100310171715.8308.qmail@sourceware.org> X-Bugzilla-Reason: CC References: Subject: [Bug fortran/43310] -pedantic errors on valid code involving PARAMETERs initialized to intrinsic function result In-Reply-To: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "kargl 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: 2010-03/txt/msg00981.txt.bz2 ------- Comment #7 from kargl at gcc dot gnu dot org 2010-03-10 17:17 ------- (In reply to comment #6) > (In reply to comment #5) > > (In reply to comment #4) > > > > > > > > "Not all valid FORTRAN 95 programs will compile properly when using this > > > option. If you want to ensure compliance with one of the FORTRAN standards, > > > please see the -std= option." > > > > > > > The problem is that your program does not conform to > > the Fortran 95 standard. > > > > It compiles without error nor warning with > gfortran -std=f95 -Wall bar.f90 > > I'm not trying to sound argumentative here but you can't have it both ways... > so are you saying that this is really a problem with -std, as opposed to > -pedantic? The issue is with -pedantic. It doesn't do what one may think it does. When one uses -pedantic, it will strictly enforce a range of [-huge():huge()] on integer types. Without -pedantic, the range is [-huge()-1:huge()]. There are issues with either choice of range. You found one with NOT(1). Another issue is with IABS() and the most negative integer value. If you're trying to enforce standard conformance use -std=f95. -pedantic has too much baggage from times before gfortran was in the tree. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43310