+2017-03-22 Dominique d'Humieres <dominiq@lps.ens.fr>
+
+ PR fortran/79602
+ * decl.c: Replace '%s' with %qs.
+ * expr.c: Likewise.
+ * interface.c: Likewise.
+ * match.c: Likewise.
+ * primary.c: Likewise.
+ * resolve.c: Likewise.
+
+ PR fortran/79844
+ PR fortran/80011
+ * io.c: Remove trailing spaces.
+ * match.c: Likewise.
+ * openmp.c: Likewise.
+ * resolve.c: Likewise.
+ * trans-intrinsic.c: Likewise.
+
+ PR fortran/79853
+ * expr.c: Remove a double spaces.
+
+ PR fortran/79859
+ * primary.c: Remove spurious quotes around %qs.
+
2017-03-22 Thomas Koenig <tkoenig@gcc.gnu.org>
PR fortran/80142
c = gfc_find_component (s->sym, name, true, true, NULL);
if (c != NULL)
{
- gfc_error_now ("Component '%s' at %C already declared at %L",
+ gfc_error_now ("Component %qs at %C already declared at %L",
name, &c->loc);
return false;
}
* don't need all the extra derived-type stuff for structures. */
if (gfc_find_symbol (gfc_dt_upper_string (name), NULL, 1, &sym))
{
- gfc_error ("Type name '%s' at %C is ambiguous", name);
+ gfc_error ("Type name %qs at %C is ambiguous", name);
return MATCH_ERROR;
}
if (sym && sym->attr.flavor == FL_STRUCT)
if (sym == NULL)
{
gfc_error ("The GENERIC DTIO INTERFACE at %C is not "
- "present in the MODULE '%s'",
+ "present in the MODULE %qs",
gfc_current_ns->proc_name->name);
return MATCH_ERROR;
}
if (sym->components != NULL || sym->attr.zero_comp)
{
- gfc_error ("Type definition of '%s' at %C was already defined at %L",
+ gfc_error ("Type definition of %qs at %C was already defined at %L",
sym->name, &sym->declared_at);
return false;
}
/* Make sure the name is not the name of an intrinsic type. */
if (gfc_is_intrinsic_typename (name))
{
- gfc_error ("Structure name '%s' at %C cannot be the same as an"
+ gfc_error ("Structure name %qs at %C cannot be the same as an"
" intrinsic type", name);
return MATCH_ERROR;
}
|| ap->expr->symtree->n.sym->ts.deferred))
{
gfc_error ("Assumed or deferred character length variable %qs "
- " in constant expression at %L",
+ "in constant expression at %L",
ap->expr->symtree->n.sym->name,
&ap->expr->where);
return MATCH_ERROR;
/* F08:7.1.11.6. */
if (f->attr.recursive
&& !gfc_notify_std (GFC_STD_F2003,
- "Specification function '%s' "
+ "Specification function %qs "
"at %L cannot be RECURSIVE", f->name, &e->where))
return false;
if (!s1 && comp1 && comp1->attr.subroutine && s2 && s2->attr.function)
{
gfc_error ("Interface mismatch in procedure pointer assignment "
- "at %L: '%s' is not a subroutine", &rvalue->where, name);
+ "at %L: %qs is not a subroutine", &rvalue->where, name);
return false;
}
gcc_assert (dtio_sub);
if (!dtio_sub->attr.subroutine)
- gfc_error ("DTIO procedure '%s' at %L must be a subroutine",
+ gfc_error ("DTIO procedure %qs at %L must be a subroutine",
dtio_sub->name, &dtio_sub->declared_at);
arg_num = 0;
if (arg_num < (formatted ? 6 : 4))
{
- gfc_error ("Too few dummy arguments in DTIO procedure '%s' at %L",
+ gfc_error ("Too few dummy arguments in DTIO procedure %qs at %L",
dtio_sub->name, &dtio_sub->declared_at);
return;
}
if (arg_num > (formatted ? 6 : 4))
{
- gfc_error ("Too many dummy arguments in DTIO procedure '%s' at %L",
+ gfc_error ("Too many dummy arguments in DTIO procedure %qs at %L",
dtio_sub->name, &dtio_sub->declared_at);
return;
}
io_constraint (unformatted && dt->namelist == NULL,
"DELIM= specifier at %L must be with FMT=* or "
- "NML= specifier ", &dt->delim->where);
+ "NML= specifier", &dt->delim->where);
}
}
if (c)
goto yes;
- gfc_error ("'%s' is neither a defined operator nor a "
+ gfc_error ("%qs is neither a defined operator nor a "
"structure component in dotted string at %C", name);
goto error;
}
{
if (saw_stat)
{
- gfc_error ("Redundant STAT tag found at %L ", &tmp->where);
+ gfc_error ("Redundant STAT tag found at %L", &tmp->where);
goto cleanup;
}
stat = tmp;
{
if (saw_errmsg)
{
- gfc_error ("Redundant ERRMSG tag found at %L ", &tmp->where);
+ gfc_error ("Redundant ERRMSG tag found at %L", &tmp->where);
goto cleanup;
}
errmsg = tmp;
{
if (saw_until_count)
{
- gfc_error ("Redundant UNTIL_COUNT tag found at %L ",
+ gfc_error ("Redundant UNTIL_COUNT tag found at %L",
&tmp->where);
goto cleanup;
}
{
if (saw_stat)
{
- gfc_error ("Redundant STAT tag found at %L ", &tmp->where);
+ gfc_error ("Redundant STAT tag found at %L", &tmp->where);
goto cleanup;
}
stat = tmp;
{
if (saw_errmsg)
{
- gfc_error ("Redundant ERRMSG tag found at %L ", &tmp->where);
+ gfc_error ("Redundant ERRMSG tag found at %L", &tmp->where);
goto cleanup;
}
errmsg = tmp;
{
if (saw_acq_lock)
{
- gfc_error ("Redundant ACQUIRED_LOCK tag found at %L ",
+ gfc_error ("Redundant ACQUIRED_LOCK tag found at %L",
&tmp->where);
goto cleanup;
}
{
if (saw_stat)
{
- gfc_error ("Redundant STAT tag found at %L ", &tmp->where);
+ gfc_error ("Redundant STAT tag found at %L", &tmp->where);
goto cleanup;
}
stat = tmp;
{
if (saw_errmsg)
{
- gfc_error ("Redundant ERRMSG tag found at %L ", &tmp->where);
+ gfc_error ("Redundant ERRMSG tag found at %L", &tmp->where);
goto cleanup;
}
errmsg = tmp;
/* Enforce C630. */
if (saw_stat)
{
- gfc_error ("Redundant STAT tag found at %L ", &tmp->where);
+ gfc_error ("Redundant STAT tag found at %L", &tmp->where);
goto cleanup;
}
/* Enforce C630. */
if (saw_errmsg)
{
- gfc_error ("Redundant ERRMSG tag found at %L ", &tmp->where);
+ gfc_error ("Redundant ERRMSG tag found at %L", &tmp->where);
goto cleanup;
}
/* Enforce C630. */
if (saw_source)
{
- gfc_error ("Redundant SOURCE tag found at %L ", &tmp->where);
+ gfc_error ("Redundant SOURCE tag found at %L", &tmp->where);
goto cleanup;
}
/* Check F08:C636. */
if (saw_mold)
{
- gfc_error ("Redundant MOLD tag found at %L ", &tmp->where);
+ gfc_error ("Redundant MOLD tag found at %L", &tmp->where);
goto cleanup;
}
{
if (saw_stat)
{
- gfc_error ("Redundant STAT tag found at %L ", &tmp->where);
+ gfc_error ("Redundant STAT tag found at %L", &tmp->where);
gfc_free_expr (tmp);
goto cleanup;
}
if (saw_errmsg)
{
- gfc_error ("Redundant ERRMSG tag found at %L ", &tmp->where);
+ gfc_error ("Redundant ERRMSG tag found at %L", &tmp->where);
gfc_free_expr (tmp);
goto cleanup;
}
|| strcmp (new_use->local_name, use_list->module_name) == 0)
{
gfc_error ("The name %qs at %C has already been used as "
- "an external module name.", use_list->module_name);
+ "an external module name", use_list->module_name);
goto cleanup;
}
break;
if (!sym->attr.intrinsic
&& sym->attr.if_source == IFSRC_UNKNOWN)
gfc_error ("Implicitly declared function %s used in "
- "!$OMP DECLARE REDUCTION at %L ", sym->name, &(*e)->where);
+ "!$OMP DECLARE REDUCTION at %L", sym->name, &(*e)->where);
}
return 0;
}
&& !sym->attr.intrinsic
&& sym->attr.if_source == IFSRC_UNKNOWN)
gfc_error ("Implicitly declared subroutine %s used in "
- "!$OMP DECLARE REDUCTION at %L ", sym->name,
+ "!$OMP DECLARE REDUCTION at %L", sym->name,
©->loc);
}
gfc_code_walker (©, gfc_dummy_code_callback,
gfc_set_sym_referenced (sym);
if (sym->attr.flavor == FL_NAMELIST)
{
- gfc_error ("Namelist '%s' can not be an argument at %L",
+ gfc_error ("Namelist %qs can not be an argument at %L",
sym->name, &where);
break;
}
&& CLASS_DATA (comp)->attr.allocatable))
{
if (!gfc_notify_std (GFC_STD_F2008, "No initializer for "
- "allocatable component '%qs' given in the "
+ "allocatable component %qs given in the "
"structure constructor at %C", comp->name))
return false;
}
&& (dt_sym = gfc_find_dt_in_generic (sym)))
{
if (dt_sym->attr.flavor == FL_DERIVED)
- gfc_error ("Derived type '%s' cannot be used as a variable at %C",
+ gfc_error ("Derived type %qs cannot be used as a variable at %C",
sym->name);
return MATCH_ERROR;
}
{
t = false;
gfc_error ("Pointer initialization target at %L "
- "must not be ALLOCATABLE ", &cons->expr->where);
+ "must not be ALLOCATABLE", &cons->expr->where);
}
if (!a.save)
{
{
gfc_error_opt (OPT_Wargument_mismatch,
"Interface mismatch in global procedure %qs at %L:"
- " %s ", sym->name, &sym->declared_at, reason);
+ " %s", sym->name, &sym->declared_at, reason);
goto done;
}
if (!gfc_check_result_characteristics (sym, iface, errmsg, 200))
{
gfc_error ("%s between the MODULE PROCEDURE declaration "
- "in MODULE '%s' and the declaration at %L in "
- "(SUB)MODULE '%s'",
+ "in MODULE %qs and the declaration at %L in "
+ "(SUB)MODULE %qs",
errmsg, module_name, &sym->declared_at,
submodule_name ? submodule_name : module_name);
return false;
for (; formal; formal = formal->next)
if (formal->sym && formal->sym->attr.flavor == FL_NAMELIST)
{
- gfc_error ("Namelist '%s' can not be an argument to "
+ gfc_error ("Namelist %qs can not be an argument to "
"subroutine or function at %L",
formal->sym->name, &sym->declared_at);
return;
if (gfc_is_coindexed (event_expr))
{
- gfc_error ("The event variable at %L shall not be coindexed ",
+ gfc_error ("The event variable at %L shall not be coindexed",
&event_expr->where);
return NULL_TREE;
}