aboutsummaryrefslogtreecommitdiff
path: root/gcc/fortran
diff options
context:
space:
mode:
authorJerry DeLisle <jvdelisle@gcc.gnu.org>2009-10-11 17:41:23 +0000
committerJerry DeLisle <jvdelisle@gcc.gnu.org>2009-10-11 17:41:23 +0000
commit3c6d5e12dd0ffd98659bae850681c17e80d883ec (patch)
treec87120a21fc4fee8edc4fd61de28a504a913734a /gcc/fortran
parentd8c00a207cb6e3c2f057ba1f8f38f787863b862b (diff)
downloadgcc-3c6d5e12dd0ffd98659bae850681c17e80d883ec.zip
gcc-3c6d5e12dd0ffd98659bae850681c17e80d883ec.tar.gz
gcc-3c6d5e12dd0ffd98659bae850681c17e80d883ec.tar.bz2
re PR fortran/38439 (I/O PD edit descriptor inconsistency)
2009-10-11 Jerry DeLisle <jvdelisle@gcc.gnu.org> PR fortran/38439 * io.c (check_format): Fix locus for error messages and fix a comment. From-SVN: r152645
Diffstat (limited to 'gcc/fortran')
-rw-r--r--gcc/fortran/ChangeLog5
-rw-r--r--gcc/fortran/io.c6
2 files changed, 9 insertions, 2 deletions
diff --git a/gcc/fortran/ChangeLog b/gcc/fortran/ChangeLog
index 44c28dd..5082c0a 100644
--- a/gcc/fortran/ChangeLog
+++ b/gcc/fortran/ChangeLog
@@ -1,3 +1,8 @@
+2009-10-11 Jerry DeLisle <jvdelisle@gcc.gnu.org>
+
+ PR fortran/38439
+ * io.c (check_format): Fix locus for error messages and fix a comment.
+
2009-10-11 Paul Thomas <pault@gcc.gnu.org>
PR fortran/41583
diff --git a/gcc/fortran/io.c b/gcc/fortran/io.c
index abd370f..d6b64c4 100644
--- a/gcc/fortran/io.c
+++ b/gcc/fortran/io.c
@@ -643,6 +643,8 @@ format_item_1:
case FMT_X:
/* X requires a prior number if we're being pedantic. */
+ if (mode != MODE_FORMAT)
+ format_locus.nextc += format_string_pos;
if (gfc_notify_std (GFC_STD_GNU, "Extension: X descriptor "
"requires leading space count at %L", &format_locus)
== FAILURE)
@@ -722,7 +724,7 @@ data_desc:
break;
case FMT_P:
- /* Comma after P is allowed only for F, E, EN, ES, D, or G.
+ /* No comma after P allowed only for F, E, EN, ES, D, or G.
10.1.1 (1). */
t = format_lex ();
if (t == FMT_ERROR)
@@ -1052,7 +1054,7 @@ between_desc:
default:
if (mode != MODE_FORMAT)
- format_locus.nextc += format_string_pos;
+ format_locus.nextc += format_string_pos - 1;
if (gfc_notify_std (GFC_STD_GNU, "Extension: Missing comma at %L",
&format_locus) == FAILURE)
return FAILURE;