From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 5975 invoked by alias); 23 May 2003 14:19:51 -0000 Mailing-List: contact gcc-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-owner@gcc.gnu.org Received: (qmail 5913 invoked from network); 23 May 2003 14:19:49 -0000 Received: from unknown (HELO localhost.localdomain) (209.87.233.18) by sources.redhat.com with SMTP; 23 May 2003 14:19:49 -0000 Received: by localhost.localdomain (Postfix, from userid 1000) id 8567013D76; Thu, 22 May 2003 17:07:47 +0100 (BST) From: Paul Brook To: Bud Davis , kargl@troutmask.apl.washington.edu, gcc Subject: Re: g77 compiles illegal code in testsuite? Date: Fri, 23 May 2003 14:23:00 -0000 User-Agent: KMail/1.5.1 References: <3ECE154F.8080009@comcast.net> In-Reply-To: <3ECE154F.8080009@comcast.net> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200305221707.46374.paul@nowt.org> X-SW-Source: 2003-05/txt/msg02080.txt.bz2 On Friday 23 May 2003 1:34 pm, Bud Davis wrote: > Just to confuse things more, i compiled this snippet > > INTEGER I > REAL R,NUM > NUM=MAX(I,R) > END > > on a few f77 compilers: > > sgi - MIPSPro-77 -- Compiles without warnings or errors > dec - f90 /f77 -- Fatal Error on type mismatch > > > Maybe g77 should issue a warning (when invoked with -fpedantic) ? > > Of course, IMHO, g95 should be backwards compatable with g77 :) G95 currently allows different type kinds (ie. double or single precision) as an extension, but not different types. It could easily be modified to accept different types. I've no idea how easy/hard it would be to get g77 to do something similar. As this code is non-portable and techincally illegal a warning is issued. This becomes an error with -pedantic. Paul