Commit 3c6d5e12 by Jerry DeLisle

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
parent d8c00a20
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> 2009-10-11 Paul Thomas <pault@gcc.gnu.org>
PR fortran/41583 PR fortran/41583
......
...@@ -643,6 +643,8 @@ format_item_1: ...@@ -643,6 +643,8 @@ format_item_1:
case FMT_X: case FMT_X:
/* X requires a prior number if we're being pedantic. */ /* 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 " if (gfc_notify_std (GFC_STD_GNU, "Extension: X descriptor "
"requires leading space count at %L", &format_locus) "requires leading space count at %L", &format_locus)
== FAILURE) == FAILURE)
...@@ -722,7 +724,7 @@ data_desc: ...@@ -722,7 +724,7 @@ data_desc:
break; break;
case FMT_P: 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). */ 10.1.1 (1). */
t = format_lex (); t = format_lex ();
if (t == FMT_ERROR) if (t == FMT_ERROR)
...@@ -1052,7 +1054,7 @@ between_desc: ...@@ -1052,7 +1054,7 @@ between_desc:
default: default:
if (mode != MODE_FORMAT) 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", if (gfc_notify_std (GFC_STD_GNU, "Extension: Missing comma at %L",
&format_locus) == FAILURE) &format_locus) == FAILURE)
return FAILURE; return FAILURE;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment