aboutsummaryrefslogtreecommitdiff
path: root/libgfortran
diff options
context:
space:
mode:
authorjvdelisle <jvdelisle@138bc75d-0d04-0410-961f-82ee72b054a4>2015-04-21 16:13:54 +0000
committerjvdelisle <jvdelisle@138bc75d-0d04-0410-961f-82ee72b054a4>2015-04-21 16:13:54 +0000
commit33d33cf0a554fd9faabafef43a705cb8d230c570 (patch)
treebdf9710585dde2ee15a465b1eed70172c0171533 /libgfortran
parent4f73497aa56997aa8f0574b0378b490066298911 (diff)
2015-04-21 Jerry DeLisle <jvdelisle@gcc.gnu.org>
PR libgfortran/56743 * io/list_read.c (CASE_SEPARATORS): Add case for '!'. (is_separator): Add condition for '!'. (eat_separator): Use notify_std to warn or errord if '!' is encountered before a proper separator. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@222271 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libgfortran')
-rw-r--r--libgfortran/ChangeLog8
-rw-r--r--libgfortran/io/list_read.c7
2 files changed, 13 insertions, 2 deletions
diff --git a/libgfortran/ChangeLog b/libgfortran/ChangeLog
index 9f53ae3e8af..e17dcae46d3 100644
--- a/libgfortran/ChangeLog
+++ b/libgfortran/ChangeLog
@@ -1,3 +1,11 @@
+2015-04-21 Jerry DeLisle <jvdelisle@gcc.gnu.org>
+
+ PR libgfortran/56743
+ * io/list_read.c (CASE_SEPARATORS): Add case for '!'.
+ (is_separator): Add condition for '!'.
+ (eat_separator): Use notify_std to warn or errord if '!' is
+ encountered before a proper separator.
+
2015-04-14 Jerry DeLisle <jvdelisle@gcc.gnu.org>
PR libgfortran/65089
diff --git a/libgfortran/io/list_read.c b/libgfortran/io/list_read.c
index 45243ed9f39..a4a6dacb7a3 100644
--- a/libgfortran/io/list_read.c
+++ b/libgfortran/io/list_read.c
@@ -53,12 +53,12 @@ typedef unsigned char uchar;
case '5': case '6': case '7': case '8': case '9'
#define CASE_SEPARATORS case ' ': case ',': case '/': case '\n': case '\t': \
- case '\r': case ';'
+ case '\r': case ';': case '!'
/* This macro assumes that we're operating on a variable. */
#define is_separator(c) (c == '/' || c == ',' || c == '\n' || c == ' ' \
- || c == '\t' || c == '\r' || c == ';')
+ || c == '\t' || c == '\r' || c == ';' || c == '!')
/* Maximum repeat count. Less than ten times the maximum signed int32. */
@@ -523,6 +523,9 @@ eat_separator (st_parameter_dt *dtp)
case '!':
if (dtp->u.p.namelist_mode)
{ /* Eat a namelist comment. */
+ notify_std (&dtp->common, GFC_STD_GNU,
+ "'!' in namelist is not a valid separator,"
+ " try inserting a space");
err = eat_line (dtp);
if (err)
return err;