This is the mail archive of the
fortran@gcc.gnu.org
mailing list for the GNU Fortran project.
Re: [Patch, Fortran] PR 40881: warn for obsolescent features
2009/8/2 Manfred Schwarb <manfred99@gmx.ch>:
> I think this the wrong approach.
> You should _NOT_ couple these Warnings with -std=legacy.
Actually this was not my idea. I first discovered that warnings for
obsolescent features were missing. After that I discovered that some
of them (like arithmetic if) *do* have warnings, and I just added
warnings for some others in the same way.
Seems like I opened a can of worms with this ...
> As long as a feature is supported by a standard, you should not
> get warnings with default compiler settings
You do not get these warnings with default settings, only if you
specify -std=f95 or -pedantic.
The reason that I added -std=legacy in the testsuite was that all test
cases are by default compiled with -pedantic
> And if you think you can _ever_ delete these features from gfortran,
> I think you are mistaken. Gfortran will have to support these
> features even if they are _deleted_ from the fortran standards.
Don't worry. I don't want to delete anything. I just want gfortran to
be a standards-compliant Fortran compiler. So, as long as the Fortran
standard supports these features, gfortran surely will. Apart from
that, I don't see how gfortran would *have to* support *anything*.
> So could you couple these warnings with -Wextra, or even with
> -Wall, or introduce a new "-std=" category, this would be great.
These are all viable possibilities. If this is extremely important for
you, the fastest way to get it done is probably to do it yourself. I
am personally more concerned about getting F03 implemented than to put
large amounts of work into compatibility with F77. But, you know, the
nice thing about gfortran is that everyone is free to contribute ...
Cheers,
Janus