re PR fortran/79602 (translation: globally replace '%s' with %qs)
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. From-SVN: r246391
This commit is contained in:
parent
af181c91a9
commit
2f029c0898
11 changed files with 63 additions and 39 deletions
|
@ -1,3 +1,27 @@
|
|||
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
|
||||
|
|
|
@ -1908,7 +1908,7 @@ build_struct (const char *name, gfc_charlen *cl, gfc_expr **init,
|
|||
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;
|
||||
}
|
||||
|
@ -3138,7 +3138,7 @@ gfc_match_decl_type_spec (gfc_typespec *ts, int implicit_flag)
|
|||
* 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)
|
||||
|
@ -7578,7 +7578,7 @@ access_attr_decl (gfc_statement st)
|
|||
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;
|
||||
}
|
||||
|
@ -8595,7 +8595,7 @@ get_struct_decl (const char *name, sym_flavor fl, locus *decl,
|
|||
|
||||
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;
|
||||
}
|
||||
|
@ -8748,7 +8748,7 @@ gfc_match_structure_decl (void)
|
|||
/* 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;
|
||||
}
|
||||
|
|
|
@ -2321,7 +2321,7 @@ check_inquiry (gfc_expr *e, int not_restricted)
|
|||
|| 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;
|
||||
|
@ -2792,7 +2792,7 @@ external_spec_function (gfc_expr *e)
|
|||
/* 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;
|
||||
|
||||
|
@ -3591,7 +3591,7 @@ gfc_check_pointer_assign (gfc_expr *lvalue, gfc_expr *rvalue)
|
|||
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;
|
||||
}
|
||||
|
||||
|
|
|
@ -4694,7 +4694,7 @@ check_dtio_interface1 (gfc_symbol *derived, gfc_symtree *tb_io_st,
|
|||
|
||||
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;
|
||||
|
@ -4703,14 +4703,14 @@ check_dtio_interface1 (gfc_symbol *derived, gfc_symtree *tb_io_st,
|
|||
|
||||
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;
|
||||
}
|
||||
|
|
|
@ -3837,7 +3837,7 @@ if (condition) \
|
|||
|
||||
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);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -221,7 +221,7 @@ gfc_match_member_sep(gfc_symbol *sym)
|
|||
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;
|
||||
}
|
||||
|
@ -3141,7 +3141,7 @@ event_statement (gfc_statement st)
|
|||
{
|
||||
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;
|
||||
|
@ -3162,7 +3162,7 @@ event_statement (gfc_statement st)
|
|||
{
|
||||
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;
|
||||
|
@ -3183,7 +3183,7 @@ event_statement (gfc_statement st)
|
|||
{
|
||||
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;
|
||||
}
|
||||
|
@ -3358,7 +3358,7 @@ lock_unlock_statement (gfc_statement st)
|
|||
{
|
||||
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;
|
||||
|
@ -3379,7 +3379,7 @@ lock_unlock_statement (gfc_statement st)
|
|||
{
|
||||
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;
|
||||
|
@ -3400,7 +3400,7 @@ lock_unlock_statement (gfc_statement st)
|
|||
{
|
||||
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;
|
||||
}
|
||||
|
@ -3570,7 +3570,7 @@ sync_statement (gfc_statement st)
|
|||
{
|
||||
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;
|
||||
|
@ -3590,7 +3590,7 @@ sync_statement (gfc_statement st)
|
|||
{
|
||||
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;
|
||||
|
@ -4080,7 +4080,7 @@ alloc_opt_list:
|
|||
/* 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;
|
||||
}
|
||||
|
||||
|
@ -4106,7 +4106,7 @@ alloc_opt_list:
|
|||
/* 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;
|
||||
}
|
||||
|
||||
|
@ -4129,7 +4129,7 @@ alloc_opt_list:
|
|||
/* 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;
|
||||
}
|
||||
|
||||
|
@ -4166,7 +4166,7 @@ alloc_opt_list:
|
|||
/* 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;
|
||||
}
|
||||
|
||||
|
@ -4417,7 +4417,7 @@ dealloc_opt_list:
|
|||
{
|
||||
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;
|
||||
}
|
||||
|
@ -4442,7 +4442,7 @@ dealloc_opt_list:
|
|||
|
||||
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;
|
||||
}
|
||||
|
|
|
@ -676,7 +676,7 @@ gfc_match_use (void)
|
|||
|| 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;
|
||||
|
|
|
@ -3855,7 +3855,7 @@ resolve_omp_udr_callback2 (gfc_expr **e, int *, void *)
|
|||
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;
|
||||
}
|
||||
|
@ -3904,7 +3904,7 @@ resolve_omp_udr_clause (gfc_omp_namelist *n, gfc_namespace *ns,
|
|||
&& !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,
|
||||
|
|
|
@ -1555,7 +1555,7 @@ match_actual_arg (gfc_expr **result)
|
|||
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;
|
||||
}
|
||||
|
@ -2670,7 +2670,7 @@ build_actual_constructor (gfc_structure_ctor_component **comp_head,
|
|||
&& 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;
|
||||
}
|
||||
|
@ -3571,7 +3571,7 @@ match_variable (gfc_expr **result, int equiv_flag, int host_flag)
|
|||
&& (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;
|
||||
}
|
||||
|
|
|
@ -1342,7 +1342,7 @@ resolve_structure_cons (gfc_expr *expr, int init)
|
|||
{
|
||||
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)
|
||||
{
|
||||
|
@ -2469,7 +2469,7 @@ resolve_global_procedure (gfc_symbol *sym, locus *where,
|
|||
{
|
||||
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;
|
||||
}
|
||||
|
||||
|
@ -12345,8 +12345,8 @@ resolve_fl_procedure (gfc_symbol *sym, int mp_flag)
|
|||
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;
|
||||
|
@ -14729,7 +14729,7 @@ resolve_symbol (gfc_symbol *sym)
|
|||
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;
|
||||
|
|
|
@ -10229,7 +10229,7 @@ conv_intrinsic_event_query (gfc_code *code)
|
|||
|
||||
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;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue