This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC 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: [gfortran] Allow digits before X format to be optional


On Thu, May 20, 2004 at 08:05:48PM -0600, Roger Sayle wrote:
> On Thu, 20 May 2004, Paul Brook wrote:
> > > Will gfortran issue a warning (or similar message) that
> > > it is compiling non-conforming code?  Perhaps, we need to
> > > add a gfc_extension() to the gfc_error() and gfc_warning()
> > > functions.
> > >
> > > gfortran file.f
> > > Extension:  X edit descriptor used without integer field width.
> >
> > We already have gfc_notify_std, which can be used to issue warnings/errors
> > based on --std=<foo>.
> > Looking at the patch again, it should probably use this machanism.
> 
> I'm currently testing a patch to use gfc_notify_std as you suggest,
> but I was a bit surprised to discover during testing that gfortran
> both warns about the use of GNU extensions by default, and even warns
> about them when using -std=gnu.
> 
> I was hoping that gfc_notify_std would issue a warning if the user
> has specified -std=f95 or -std=f2003, and remain silent otherwise.
> Is this really the intended behaviour (different from the other GCC
> language front-ends)?
> 

Personally, I think gfortran should issue a warning unless -std=gnu.
The code is illegal under FORTRAN 77, Fortran 90, Fortran 95, and
the upcoming Fortran 200X.  Note, I said issue a warning not an
error message (i.e., compile the code but give the user a hint
to fix their code).

-- 
Steve


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