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

--- Comment #7 from Walter Spector <w6ws at earthlink dot net> ---
Confirmed that the compiler now diagnoses the missing commas.  Thanks!

As noted in Comment 1, there is no message at run-time for run-time formats:

$ cat badfmt2.f90
program badfmt
  implicit none

  character(10):: fmt = "(AI5)"  ! Not parameter, so not examined at compile
time
  integer :: ioerr

  write (*, fmt, iostat=ioerr) 'value =', 42
  print *, 'ioerr =', ioerr

  write (*, fmt) 'value =', 43

end program badfmt
$
$ gfortran badfmt2.f90
$ ./a.out
value =   42
 ioerr =           0
value =   43
$
$ gfortran --std=f95 badfmt2.f90
$ ./a.out
value =   42
 ioerr =           0
value =   43
$
$ 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