This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: g77 compiles illegal code in testsuite?
- From: Paul Brook <paul at nowt dot org>
- To: Bud Davis <bdavis9659 at comcast dot net>,kargl at troutmask dot apl dot washington dot edu, gcc <gcc at gcc dot gnu dot org>
- Date: Thu, 22 May 2003 17:07:45 +0100
- Subject: Re: g77 compiles illegal code in testsuite?
- References: <3ECE154F.8080009@comcast.net>
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