Commit cf004230 by Fritz Reese Committed by Fritz Reese

re PR fortran/79968 (diagnostics: merge similar diagnostics containing -fdec-structure)

2017-05-18  Fritz Reese <fritzoreese@gmail.com>

    PR fortran/79968

    gcc/fortran/ChangeLog:

	PR fortran/79968
	* decl.c (match_attr_spec, gfc_match_automatic,
	gfc_match_static, gfc_match_structure_decl): Unify diagnostic
	errors regarding -fdec options.
	* io.c (match_dec_etag, match_dec_vtag, match_dec_ftag): Ditto.

From-SVN: r248188
parent 8268fc60
2017-05-18 Fritz Reese <fritzoreese@gmail.com>
PR fortran/79968
* decl.c (match_attr_spec, gfc_match_automatic,
gfc_match_static, gfc_match_structure_decl): Unify diagnostic
errors regarding -fdec options.
* io.c (match_dec_etag, match_dec_vtag, match_dec_ftag): Ditto.
2017-05-17 Jerry DeLisle <jvdelisle@gcc.gnu.org> 2017-05-17 Jerry DeLisle <jvdelisle@gcc.gnu.org>
PR fortran/80741 PR fortran/80741
......
...@@ -4230,7 +4230,8 @@ match_attr_spec (void) ...@@ -4230,7 +4230,8 @@ match_attr_spec (void)
if ((d == DECL_STATIC || d == DECL_AUTOMATIC) if ((d == DECL_STATIC || d == DECL_AUTOMATIC)
&& !flag_dec_static) && !flag_dec_static)
{ {
gfc_error ("%s at %L is a DEC extension, enable with -fdec-static", gfc_error ("%s at %L is a DEC extension, enable with "
"%<-fdec-static%>",
d == DECL_STATIC ? "STATIC" : "AUTOMATIC", &seen_at[d]); d == DECL_STATIC ? "STATIC" : "AUTOMATIC", &seen_at[d]);
m = MATCH_ERROR; m = MATCH_ERROR;
goto cleanup; goto cleanup;
...@@ -7909,8 +7910,10 @@ gfc_match_automatic (void) ...@@ -7909,8 +7910,10 @@ gfc_match_automatic (void)
if (!flag_dec_static) if (!flag_dec_static)
{ {
gfc_error ("AUTOMATIC at %C is a DEC extension, enable with " gfc_error ("%s at %C is a DEC extension, enable with "
"-fdec-static"); "%<-fdec-static%>",
"AUTOMATIC"
);
return MATCH_ERROR; return MATCH_ERROR;
} }
...@@ -7963,7 +7966,9 @@ gfc_match_static (void) ...@@ -7963,7 +7966,9 @@ gfc_match_static (void)
if (!flag_dec_static) if (!flag_dec_static)
{ {
gfc_error ("STATIC at %C is a DEC extension, enable with -fdec-static"); gfc_error ("%s at %C is a DEC extension, enable with "
"%<-fdec-static%>",
"STATIC");
return MATCH_ERROR; return MATCH_ERROR;
} }
...@@ -8722,8 +8727,9 @@ gfc_match_structure_decl (void) ...@@ -8722,8 +8727,9 @@ gfc_match_structure_decl (void)
if (!flag_dec_structure) if (!flag_dec_structure)
{ {
gfc_error ("STRUCTURE at %C is a DEC extension, enable with " gfc_error ("%s at %C is a DEC extension, enable with "
"-fdec-structure"); "%<-fdec-structure%>",
"STRUCTURE");
return MATCH_ERROR; return MATCH_ERROR;
} }
......
...@@ -1515,8 +1515,8 @@ match_dec_etag (const io_tag *tag, gfc_expr **e) ...@@ -1515,8 +1515,8 @@ match_dec_etag (const io_tag *tag, gfc_expr **e)
return m; return m;
else if (m != MATCH_NO) else if (m != MATCH_NO)
{ {
gfc_error ("%s is a DEC extension at %C, re-compile with " gfc_error ("%s at %C is a DEC extension, enable with "
"-fdec to enable", tag->name); "%<-fdec%>", tag->name);
return MATCH_ERROR; return MATCH_ERROR;
} }
return m; return m;
...@@ -1532,8 +1532,8 @@ match_dec_vtag (const io_tag *tag, gfc_expr **e) ...@@ -1532,8 +1532,8 @@ match_dec_vtag (const io_tag *tag, gfc_expr **e)
return m; return m;
else if (m != MATCH_NO) else if (m != MATCH_NO)
{ {
gfc_error ("%s is a DEC extension at %C, re-compile with " gfc_error ("%s at %C is a DEC extension, enable with "
"-fdec to enable", tag->name); "%<-fdec%>", tag->name);
return MATCH_ERROR; return MATCH_ERROR;
} }
return m; return m;
...@@ -1553,8 +1553,8 @@ match_dec_ftag (const io_tag *tag, gfc_open *o) ...@@ -1553,8 +1553,8 @@ match_dec_ftag (const io_tag *tag, gfc_open *o)
if (!flag_dec) if (!flag_dec)
{ {
gfc_error ("%s is a DEC extension at %C, re-compile with " gfc_error ("%s at %C is a DEC extension, enable with "
"-fdec to enable", tag->name); "%<-fdec%>", tag->name);
return MATCH_ERROR; return MATCH_ERROR;
} }
......
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