public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/114611] New: H edit descriptor should flag as error with -std-f95 (or higher)
@ 2024-04-05 19:19 w6ws at earthlink dot net
  2024-04-07 18:43 ` [Bug fortran/114611] " jvdelisle at gcc dot gnu.org
  0 siblings, 1 reply; 2+ messages in thread
From: w6ws at earthlink dot net @ 2024-04-05 19:19 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114611

            Bug ID: 114611
           Summary: H edit descriptor should flag as error with -std-f95
                    (or higher)
           Product: gcc
           Version: 14.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: fortran
          Assignee: unassigned at gcc dot gnu.org
          Reporter: w6ws at earthlink dot net
  Target Milestone: ---

When an H edit descriptor is used in a format, only a warning is given when
-std=f95 (or higher) is specified.  It should be an error, as are other ancient
features that were deleted in F95 such as PAUSE and ASSIGN/assigned GO TO.

Note in the following example that PAUSE gives an error, whereas use of the H
edit descriptor is only a warning:

wws@w6ws-4:/tmp/wws$ cat fmt1.f90
program fmt1
  implicit none

  pause 13

  print 100
100 format (1H ,"Hello World")
end program
wws@w6ws-4:/tmp/wws$ gfortran -std=f95 fmt1.f90
fmt1.f90:4:10:

    4 |   pause 13
      |          1
Error: Deleted feature: PAUSE statement at (1)
fmt1.f90:7:17:

    7 | 100 format (1H ,"Hello World")
      |                 1
Warning: The H format specifier at (1) is a Fortran 95 deleted feature
wws@w6ws-4:/tmp/wws$ 
wws@w6ws-4:/tmp/wws$ gfortran --version
GNU Fortran (GCC) 14.0.1 20240115 (experimental)
Copyright (C) 2024 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

wws@w6ws-4:/tmp/wws$

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2024-04-07 18:43 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-04-05 19:19 [Bug fortran/114611] New: H edit descriptor should flag as error with -std-f95 (or higher) w6ws at earthlink dot net
2024-04-07 18:43 ` [Bug fortran/114611] " jvdelisle at gcc dot gnu.org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).