This is the mail archive of the fortran@gcc.gnu.org mailing list for the GNU Fortran project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: suggestion about g77


On Tuesday 22 March 2005 22:59, Tim Prince wrote:
> At 09:37 AM 3/22/2005, Paul Brook wrote:
> >On Tuesday 22 March 2005 17:32, Lars Segerlund wrote:
> > >  I am quite sure it's not permitted, since both the HPF standard & the
> > > OpenMP standard mentions that by default the save attribute is always
> > > off in f77 and on in f[90,95] and consider it a problem.
> >
> >But does this cause any observable problems? Ie. can you write a legal f77
> >program that isn't also legal f95 (assuming we reinstate the explicitly
> >deleted features).
>
> I could write a legal f77 program (in the sense of compiling without
> warnings on compilers I know) which gives different results in f95 from
> what it did in f77 on a certain IBM system. I don't know any commonly
> available compiler, f77 or whatever, which would reproduce the old IBM
> result.

Just because it compiles doesn't mean it's a legal program. It's simply not 
possible for a compiler to diagnose all illegal programs. The subset of 
programs where a diagnostic is required is even smaller.

A trivial example:

read *, a
print *, 1/a
end

Is legal as long as it's never given "0" as an input.

Paul


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]