At some point between 4.3 and 4.4 the error printed for "(EN)" has changed. The
standard mandates for EN the syntax "EN w . d [E e]" with non-zero w.

4.3 printed:

write(*,'(EN)') 5.0
                  1
Error: Positive width required in format string at (1)


While 4.4 prints:

write(*,'(EN)') 5.0
                  1
Error: Period required in format specifier at (1)

write(*,'(EN)') 5.0
       1
Error: Unexpected end of format string in format string at (1)


Expected:
a) The message about the missing "w" comes before the one about the missing
dot; that is less misleading, though both messages are correct.

b) The messages contain the edit descriptor of interest, i.e. instead of
  Error: Positive width required in format string at (1)
it should be e.g.
  Error: Positive width required for EN edit descriptor at (1)
or
  Error: Period required for EN edit descriptor at (1)

c) Do we need to also print the "unexpected end of format string"? Except for
the "w.d" it looks OK. Or is this simply a side effect of (a)?

Reason for (b): As the "1" is not under the edit descriptor (but under the
object belonging to the edit descriptor) it is nontrivial to see which edit
descriptor is wrong.


-- 
           Summary: Diagnostic of edit descriptors, esp. EN
           Product: gcc
           Version: 4.4.0
            Status: UNCONFIRMED
          Keywords: diagnostic
          Severity: normal
          Priority: P3
         Component: fortran
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: burnus at gcc dot gnu dot org


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37446

Reply via email to