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

--- Comment #2 from Walter Spector <w6ws at earthlink dot net> ---
Revisiting this, I still think that by the definition of the default -std=gnu,
the compiler should give a warning by default, and give an error when -std=f95
(or higher) is specified.

Currently no warning is issued by default, and only a warning is issued with
-std=f95:

$ cat pf.f
      program pf
      implicit none

      character(*), parameter :: hwc = '(12hhello World!)'

      print 100
  100 format (12hHello world!)

      write (*, hwc)

      end
$ gfortran pf.f
$ ./a.out
Hello world!
hello World!
$
$ rm a.out
$ gfortran -std=f95 pf.f
pf.f:7:21:

    7 |   100 format (12hHello world!)
      |                     1
Warning: The H format specifier at (1) is a Fortran 95 deleted feature
pf.f:9:19:

    9 |       write (*, hwc)
      |                   1
Warning: The H format specifier at (1) is a Fortran 95 deleted feature
$ ./a.out
Hello world!
hello World!
$
$ gfortran --version
GNU Fortran (GCC) 16.0.0 20250529 (experimental)
Copyright (C) 2025 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.

$

Reply via email to