aboutsummaryrefslogtreecommitdiff
path: root/gcc/fortran/io.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/fortran/io.c')
-rw-r--r--gcc/fortran/io.c6
1 files changed, 4 insertions, 2 deletions
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;