aboutsummaryrefslogtreecommitdiff
path: root/gcc/fortran/io.c
diff options
context:
space:
mode:
authorFrançois-Xavier Coudert <fxcoudert@gcc.gnu.org>2006-02-19 21:31:02 +0000
committerFrançois-Xavier Coudert <fxcoudert@gcc.gnu.org>2006-02-19 21:31:02 +0000
commit8f0d39a86b963ad0d39edb2e7bf633b5790432fc (patch)
tree0f202b9e85194d9bc5ec4b762d158c3dabb04d2c /gcc/fortran/io.c
parentf5dc42bbcc9180a661f1447efda575d6362cf9fc (diff)
downloadgcc-8f0d39a86b963ad0d39edb2e7bf633b5790432fc.zip
gcc-8f0d39a86b963ad0d39edb2e7bf633b5790432fc.tar.gz
gcc-8f0d39a86b963ad0d39edb2e7bf633b5790432fc.tar.bz2
re PR libfortran/21303 (L edit descriptor without a width)
PR libfortran/21303 * gfortran.h (notification): New enumeration. (gfc_notification_std): Prototype for the new function. * error.c (gfc_notification_std): New function. * io.c (check_format): Handle the case of a L format descriptor without a width. * runtime/error.c (notification_std): New function. * libgfortran.h (notification): New enumeration. * io/io.h (notification_std): Prototype for the new function. * io/format.c (parse_format_list): Handle the case of a L format descriptor without a width. * gcc/testsuite/gfortran.dg/fmt_l.f90: New test. From-SVN: r111281
Diffstat (limited to 'gcc/fortran/io.c')
-rw-r--r--gcc/fortran/io.c22
1 files changed, 20 insertions, 2 deletions
diff --git a/gcc/fortran/io.c b/gcc/fortran/io.c
index 618d056..b45e983a 100644
--- a/gcc/fortran/io.c
+++ b/gcc/fortran/io.c
@@ -569,8 +569,26 @@ data_desc:
if (t == FMT_POSINT)
break;
- error = posint_required;
- goto syntax;
+ switch (gfc_notification_std (GFC_STD_GNU))
+ {
+ case WARNING:
+ gfc_warning
+ ("Extension: Missing positive width after L descriptor at %C");
+ saved_token = t;
+ break;
+
+ case ERROR:
+ error = posint_required;
+ goto syntax;
+
+ case SILENT:
+ saved_token = t;
+ break;
+
+ default:
+ gcc_unreachable ();
+ }
+ break;
case FMT_A:
t = format_lex ();