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

            Bug ID: 92350
           Summary: Document non-standard namelist quote handling in
                    gfortran
           Product: gcc
           Version: 10.0
            Status: UNCONFIRMED
          Keywords: documentation
          Severity: normal
          Priority: P3
         Component: fortran
          Assignee: unassigned at gcc dot gnu.org
          Reporter: burnus at gcc dot gnu.org
                CC: jvdelisle at gcc dot gnu.org
  Target Milestone: ---

This came up very recently at
https://software.intel.com/en-us/forums/intel-fortran-compiler/topic/831685

And was last mentioned at
https://gcc.gnu.org/ml/gcc-patches/2014-03/msg00055.html
As far as I can see, we didn't handle it back then.

When the Fortran 90 standard was drafted, the authors unfortunately missed that
unquoted strings in namelists are bad as many strings cannot be read in unless
the string is quoted. Hence, Fortran 90+ requires that strings are written
without quotes.  (For other uses like list-directed I/O, no quotes is most of
the time fine.) – Fortran 2003 (finally!) added an option to use quotes
(delim=none,quote,apostroph) – but, obviously, it couldn't change the default.


gfortran since (nearly?) the beginning was always adding " around strings in
namelists, which is very sensible but not standard conforming.

The question is what we want to do about it. Note:

* Since Fortran 2003, user can set the delim= they want to have; as compilers
supporting this are ubiquitous, special user needs can be dealt with this
easily.

* Changing the default is nice for standard compliance but bad for (gfortran)
user experience.

* Adding a special flag - or handling based on -std=f… vs. -std=gnu/legacy
would be an option.

* Or simply: Only document this deviation from the standard.

[I think, we should do at least the latter.]

Reply via email to