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: [Patch, Fortran] PR 40881: warn for obsolescent features


Hi Janus,

Janus Weil wrote:
Hi all,

the Fortran 90 standard lists nine "obsolescent" f77 features, which
continue to be supported in f90, but may be deleted in the future.
Therefore their usage is discouraged by the standard. Currently, we
only warn about two of them (arithmetic if and assumed length
character functions). This patch adds warnings for four more:

* alternate return
* computed goto
* statement functions
* old-style character lengths ["character*..." instead of "character(...)"]

That leaves three obsolescent features, which are not warned about:

* shared DO termination
* DATA statements among executable statements
* fixed form source

These may be added later.

The patch is technically very simple, but has a rather large impact on
the testsuite, since lots of test cases use old-style character
lengths. For most of them I just added -std=legacy. But some already
use -std=f95, so I had to change the character lengths to f90 style or
add a dg-warning. For the already-implemented obsolescent warnings I
changed the message to unify it with the new ones, so I also had to
change some dg-warnings in the testsuite.

Regtested on x86_64-unknown-linux-gnu. Ok for trunk?

I like this update on warnings, and indeed ok for trunk with me.


Thanks for working on this!

Daniel

--
Done:  Arc-Bar-Cav-Ran-Rog-Sam-Tou-Val-Wiz
To go: Hea-Kni-Mon-Pri


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