io.c (format_item): Allow the number before the X format to be optional when not...
authorRoger Sayle <roger@eyesopen.com>
Thu, 20 May 2004 18:56:33 +0000 (18:56 +0000)
committerRoger Sayle <sayle@gcc.gnu.org>
Thu, 20 May 2004 18:56:33 +0000 (18:56 +0000)
* io.c (format_item): Allow the number before the X format to
be optional when not -pedantic.

From-SVN: r82067

gcc/fortran/ChangeLog
gcc/fortran/io.c

index 8e1d6b3293372da20b8a70ebc57a793f893c17af..8203f53b6fd2c025ddd7084e6539e4a52426eb26 100644 (file)
@@ -1,3 +1,8 @@
+2004-05-20  Roger Sayle  <roger@eyesopen.com>
+
+       * io.c (format_item): Allow the number before the X format to
+       be optional when not -pedantic.
+
 2004-05-18  Feng Wang  <fengwang@nudt.edu.cn>
        Paul Brook  <paul@codesourcery.com>
 
index e2fd33dc77276839b4cb00f7c16704db7493b5b0..7d3702c8f2dd5a1a7d58cdf5a7e1d3ed496bf5bd 100644 (file)
@@ -467,11 +467,14 @@ format_item:
       goto data_desc;
 
     case FMT_P:
-      /* P and X require a prior number.  */
+      /* P requires a prior number.  */
       error = "P descriptor requires leading scale factor";
       goto syntax;
 
     case FMT_X:
+      /* X requires a prior number if we're being pedantic.  */
+      if (!pedantic)
+       goto between_desc;
       error = "X descriptor requires leading space count";
       goto syntax;