summaryrefslogtreecommitdiff
path: root/gcc/fortran
diff options
context:
space:
mode:
authordominiq <dominiq@138bc75d-0d04-0410-961f-82ee72b054a4>2017-03-22 16:29:30 +0000
committerdominiq <dominiq@138bc75d-0d04-0410-961f-82ee72b054a4>2017-03-22 16:29:30 +0000
commit1b7008c4c12878ef1ac41882d1d1517920047054 (patch)
tree2feb2461ca530381301a8167867448f482e3fda8 /gcc/fortran
parent43b0b3ac03893413e1f769fe44868133becd8125 (diff)
downloadgcc-1b7008c4c12878ef1ac41882d1d1517920047054.tar.gz
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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@246391 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/fortran')
-rw-r--r--gcc/fortran/ChangeLog24
-rw-r--r--gcc/fortran/decl.c10
-rw-r--r--gcc/fortran/expr.c6
-rw-r--r--gcc/fortran/interface.c6
-rw-r--r--gcc/fortran/io.c2
-rw-r--r--gcc/fortran/match.c30
-rw-r--r--gcc/fortran/module.c2
-rw-r--r--gcc/fortran/openmp.c4
-rw-r--r--gcc/fortran/primary.c6
-rw-r--r--gcc/fortran/resolve.c10
-rw-r--r--gcc/fortran/trans-intrinsic.c2
11 files changed, 63 insertions, 39 deletions
diff --git a/gcc/fortran/ChangeLog b/gcc/fortran/ChangeLog
index 1dce756ecc6..bbfced17928 100644
--- a/gcc/fortran/ChangeLog
+++ b/gcc/fortran/ChangeLog
@@ -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
diff --git a/gcc/fortran/decl.c b/gcc/fortran/decl.c
index 7d61fbf37af..a04f5a66ec3 100644
--- a/gcc/fortran/decl.c
+++ b/gcc/fortran/decl.c
@@ -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;
}
diff --git a/gcc/fortran/expr.c b/gcc/fortran/expr.c
index f90bdc39876..0e5f04d0bdf 100644
--- a/gcc/fortran/expr.c
+++ b/gcc/fortran/expr.c
@@ -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;
}
diff --git a/gcc/fortran/interface.c b/gcc/fortran/interface.c
index 80dae027da0..6fe0647ecfe 100644
--- a/gcc/fortran/interface.c
+++ b/gcc/fortran/interface.c
@@ -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;
}
diff --git a/gcc/fortran/io.c b/gcc/fortran/io.c
index 5a7bc01bed1..60df44dc695 100644
--- a/gcc/fortran/io.c
+++ b/gcc/fortran/io.c
@@ -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);
}
}
diff --git a/gcc/fortran/match.c b/gcc/fortran/match.c
index a47585c5516..006ac0312ac 100644
--- a/gcc/fortran/match.c
+++ b/gcc/fortran/match.c
@@ -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;
}
diff --git a/gcc/fortran/module.c b/gcc/fortran/module.c
index 80a65244600..60adde3c635 100644
--- a/gcc/fortran/module.c
+++ b/gcc/fortran/module.c
@@ -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;
diff --git a/gcc/fortran/openmp.c b/gcc/fortran/openmp.c
index 11f4efb67a1..89eecfa2ed1 100644
--- a/gcc/fortran/openmp.c
+++ b/gcc/fortran/openmp.c
@@ -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,
&copy->loc);
}
gfc_code_walker (&copy, gfc_dummy_code_callback,
diff --git a/gcc/fortran/primary.c b/gcc/fortran/primary.c
index d7fc6c41b03..c12dc3562d3 100644
--- a/gcc/fortran/primary.c
+++ b/gcc/fortran/primary.c
@@ -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;
}
diff --git a/gcc/fortran/resolve.c b/gcc/fortran/resolve.c
index accb5a258a9..565e02b534b 100644
--- a/gcc/fortran/resolve.c
+++ b/gcc/fortran/resolve.c
@@ -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;
diff --git a/gcc/fortran/trans-intrinsic.c b/gcc/fortran/trans-intrinsic.c
index b7524bceb6b..3c9e1d5e037 100644
--- a/gcc/fortran/trans-intrinsic.c
+++ b/gcc/fortran/trans-intrinsic.c
@@ -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;
}