* gfortran.h (gfc_error): Rename overload with OPT argument to...
(gfc_error_opt): ... this.
* error.c (gfc_error): Rename overloads with OPT argument to...
(gfc_error_opt): ... this. Adjust callers.
(gfc_notify_std, gfc_error): Adjust callers.
* resolve.c (resolve_structure_cons, resolve_global_procedure): Use
gfc_error_opt instead of gfc_error.
* interface.c (argument_rank_mismatch, compare_parameter,
gfc_check_typebound_override): Likewise. Fix up formatting.
From-SVN: r243941
+2016-12-27 Jakub Jelinek <jakub@redhat.com>
+
+ * gfortran.h (gfc_error): Rename overload with OPT argument to...
+ (gfc_error_opt): ... this.
+ * error.c (gfc_error): Rename overloads with OPT argument to...
+ (gfc_error_opt): ... this. Adjust callers.
+ (gfc_notify_std, gfc_error): Adjust callers.
+ * resolve.c (resolve_structure_cons, resolve_global_procedure): Use
+ gfc_error_opt instead of gfc_error.
+ * interface.c (argument_rank_mismatch, compare_parameter,
+ gfc_check_typebound_override): Likewise. Fix up formatting.
+
2016-12-23 Andre Vehreschild <vehre@gcc.gnu.org>
* trans-expr.c (trans_class_assignment): Allocate memory of _vptr->size
}
static void
-gfc_error (int opt, const char *gmsgid, va_list ap) ATTRIBUTE_GCC_GFC(2,0);
+gfc_error_opt (int opt, const char *gmsgid, va_list ap) ATTRIBUTE_GCC_GFC(2,0);
static bool
gfc_warning (int opt, const char *gmsgid, va_list ap) ATTRIBUTE_GCC_GFC(2,0);
if (warning)
gfc_warning (0, buffer, argp);
else
- gfc_error (0, buffer, argp);
+ gfc_error_opt (0, buffer, argp);
va_end (argp);
return (warning && !warnings_are_errors) ? true : false;
/* Issue an error. */
static void
-gfc_error (int opt, const char *gmsgid, va_list ap)
+gfc_error_opt (int opt, const char *gmsgid, va_list ap)
{
va_list argp;
va_copy (argp, ap);
void
-gfc_error (int opt, const char *gmsgid, ...)
+gfc_error_opt (int opt, const char *gmsgid, ...)
{
va_list argp;
va_start (argp, gmsgid);
- gfc_error (opt, gmsgid, argp);
+ gfc_error_opt (opt, gmsgid, argp);
va_end (argp);
}
{
va_list argp;
va_start (argp, gmsgid);
- gfc_error (0, gmsgid, argp);
+ gfc_error_opt (0, gmsgid, argp);
va_end (argp);
}
void gfc_clear_warning (void);
void gfc_warning_check (void);
-void gfc_error (int opt, const char *, ...) ATTRIBUTE_GCC_GFC(2,3);
+void gfc_error_opt (int opt, const char *, ...) ATTRIBUTE_GCC_GFC(2,3);
void gfc_error (const char *, ...) ATTRIBUTE_GCC_GFC(1,2);
void gfc_error_now (const char *, ...) ATTRIBUTE_GCC_GFC(1,2);
void gfc_fatal_error (const char *, ...) ATTRIBUTE_NORETURN ATTRIBUTE_GCC_GFC(1,2);
/* TS 29113, C407b. */
if (rank2 == -1)
- {
- gfc_error ("The assumed-rank array at %L requires that the dummy argument"
- " %qs has assumed-rank", where, name);
- }
+ gfc_error ("The assumed-rank array at %L requires that the dummy argument"
+ " %qs has assumed-rank", where, name);
else if (rank1 == 0)
- {
- gfc_error (OPT_Wargument_mismatch, "Rank mismatch in argument %qs at %L "
- "(scalar and rank-%d)", name, where, rank2);
- }
+ gfc_error_opt (OPT_Wargument_mismatch, "Rank mismatch in argument %qs "
+ "at %L (scalar and rank-%d)", name, where, rank2);
else if (rank2 == 0)
- {
- gfc_error (OPT_Wargument_mismatch, "Rank mismatch in argument %qs at %L "
- "(rank-%d and scalar)", name, where, rank1);
- }
+ gfc_error_opt (OPT_Wargument_mismatch, "Rank mismatch in argument %qs "
+ "at %L (rank-%d and scalar)", name, where, rank1);
else
- {
- gfc_error (OPT_Wargument_mismatch, "Rank mismatch in argument %qs at %L "
- "(rank-%d and rank-%d)", name, where, rank1, rank2);
- }
+ gfc_error_opt (OPT_Wargument_mismatch, "Rank mismatch in argument %qs "
+ "at %L (rank-%d and rank-%d)", name, where, rank1, rank2);
}
sizeof(err), NULL, NULL))
{
if (where)
- gfc_error (OPT_Wargument_mismatch,
- "Interface mismatch in dummy procedure %qs at %L: %s",
- formal->name, &actual->where, err);
+ gfc_error_opt (OPT_Wargument_mismatch,
+ "Interface mismatch in dummy procedure %qs at %L:"
+ " %s", formal->name, &actual->where, err);
return false;
}
err, sizeof(err), NULL, NULL))
{
if (where)
- gfc_error (OPT_Wargument_mismatch,
- "Interface mismatch in dummy procedure %qs at %L: %s",
- formal->name, &actual->where, err);
+ gfc_error_opt (OPT_Wargument_mismatch,
+ "Interface mismatch in dummy procedure %qs at %L:"
+ " %s", formal->name, &actual->where, err);
return false;
}
}
CLASS_DATA (actual)->ts.u.derived)))
{
if (where)
- gfc_error (OPT_Wargument_mismatch,
- "Type mismatch in argument %qs at %L; passed %s to %s",
- formal->name, where, gfc_typename (&actual->ts),
- gfc_typename (&formal->ts));
+ gfc_error_opt (OPT_Wargument_mismatch,
+ "Type mismatch in argument %qs at %L; passed %s to %s",
+ formal->name, where, gfc_typename (&actual->ts),
+ gfc_typename (&formal->ts));
return false;
}
if (!gfc_check_dummy_characteristics (proc_formal->sym, old_formal->sym,
check_type, err, sizeof(err)))
{
- gfc_error (OPT_Wargument_mismatch,
- "Argument mismatch for the overriding procedure "
- "%qs at %L: %s", proc->name, &where, err);
+ gfc_error_opt (OPT_Wargument_mismatch,
+ "Argument mismatch for the overriding procedure "
+ "%qs at %L: %s", proc->name, &where, err);
return false;
}
if (s2 && !gfc_compare_interfaces (comp->ts.interface, s2, name, 0, 1,
err, sizeof (err), NULL, NULL))
{
- gfc_error (OPT_Wargument_mismatch,
- "Interface mismatch for procedure-pointer component "
- "%qs in structure constructor at %L: %s",
- comp->name, &cons->expr->where, err);
+ gfc_error_opt (OPT_Wargument_mismatch,
+ "Interface mismatch for procedure-pointer "
+ "component %qs in structure constructor at %L:"
+ " %s", comp->name, &cons->expr->where, err);
return false;
}
}
if (!gfc_compare_interfaces (sym, def_sym, sym->name, 0, 1,
reason, sizeof(reason), NULL, NULL))
{
- gfc_error (OPT_Wargument_mismatch,
- "Interface mismatch in global procedure %qs at %L: %s ",
- sym->name, &sym->declared_at, reason);
+ gfc_error_opt (OPT_Wargument_mismatch,
+ "Interface mismatch in global procedure %qs at %L:"
+ " %s ", sym->name, &sym->declared_at, reason);
goto done;
}