gfortran should have a flag ("-Wobsolescent" or similar) to turn on warnings
about obsolescent features. These features are listed in chapter B.2 in the
Fortran standard. They are not forbidden by the standard, but are redundant and
can be replaced by newer and better features.

The standard also notes the possibility that they may be removed in the future.
Therefore gfortran should discourage their usage, just like the standard does.

Obsolescent features in Fortran 2003 are:

   (1) Arithmetic IF
   (2) Shared DO termination and termination
       on a statement other than END DO or CONTINUE
   (3) Alternate return
   (4) Computed GO TO statement
   (5) Statement functions
   (6) DATA statements amongst executable statements
   (7) Assumed length character functions
   (8) Fixed form source
   (9) CHARACTER* form of CHARACTER declaration


The -Wobsolescent flag does not have to go into -Wall (maybe -Wextra?)


-- 
           Summary: warn for obsolescent features
           Product: gcc
           Version: 4.5.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: fortran
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: janus at gcc dot gnu dot org


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40881

Reply via email to