diff options
author | jvdelisle <jvdelisle@138bc75d-0d04-0410-961f-82ee72b054a4> | 2009-10-11 17:41:23 +0000 |
---|---|---|
committer | jvdelisle <jvdelisle@138bc75d-0d04-0410-961f-82ee72b054a4> | 2009-10-11 17:41:23 +0000 |
commit | 5e25c66ceab2f5a28467402b4f021a8d3ecb30a3 (patch) | |
tree | c87120a21fc4fee8edc4fd61de28a504a913734a /gcc/fortran/io.c | |
parent | be17d6bf45428b429e7c0751ef3c8660e43330c3 (diff) | |
download | gcc-5e25c66ceab2f5a28467402b4f021a8d3ecb30a3.tar.gz |
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.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@152645 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/fortran/io.c')
-rw-r--r-- | gcc/fortran/io.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/gcc/fortran/io.c b/gcc/fortran/io.c index abd370f5048..d6b64c4120c 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; |