Janus Weil wrote:
2013/5/5 Jerry DeLisle <jvdeli...@charter.net>:
On 05/04/2013 06:30 PM, Steve Kargl wrote:
On Sat, May 04, 2013 at 05:13:51PM -0700, Jerry DeLisle wrote:
      CASE_SEPARATORS:        /* Not a repeat count.  */
      case EOF:
+    case '!':
       if (c == '!')
          gfc_warning("GNU Fortran extension: accepting a possibly "
                  "corrupted namelist");

I would prefer that gfortran issues an error.
Issuing a warning is acceptable.
Patch as is not OK IMHO.

PS: A vendor extension should be documented in the manual.

I don't see much point in issuing a warning if we accept it.  I can just as
easily make it an error with something like "A value separator is required
before a namelist comment" and be done with trying to second guess whether
someone is using namelists right or not.

An error would be most consistent across all variable kinds.

Any other opinions out there?
How about throwing an error only with -std=f2008 and friends, and
accepting it as an extension with -std=gnu?

I personally do not like modified run-time behaviour, depending on -std=, as it can be very confusing. Especially as it depends only on the compile-time options used for the Fortran main program and not on the flags used for compiling the file. I also do not like the warning.

On the other hand, I am fine with either accepting "!" comments without blank as vendor extension and with unconditionally printing an error.

In any case, the patch is an improvement to the current situation of silently ignoring that entry. (Printing an error would be likewise an improvement.)

Tobias

Reply via email to