aboutsummaryrefslogtreecommitdiff
path: root/gcc/fortran/resolve.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/fortran/resolve.c')
-rw-r--r--gcc/fortran/resolve.c39
1 files changed, 20 insertions, 19 deletions
diff --git a/gcc/fortran/resolve.c b/gcc/fortran/resolve.c
index 3fe09f6..bb42404 100644
--- a/gcc/fortran/resolve.c
+++ b/gcc/fortran/resolve.c
@@ -1728,7 +1728,7 @@ resolve_procedure_expression (gfc_expr* expr)
/* A non-RECURSIVE procedure that is used as procedure expression within its
own body is in danger of being called recursively. */
if (is_illegal_recursion (sym, gfc_current_ns))
- gfc_warning ("Non-RECURSIVE procedure %qs at %L is possibly calling"
+ gfc_warning (0, "Non-RECURSIVE procedure %qs at %L is possibly calling"
" itself recursively. Declare it RECURSIVE or use"
" %<-frecursive%>", sym->name, &expr->where);
@@ -2120,7 +2120,7 @@ resolve_elemental_actual (gfc_expr *expr, gfc_code *c)
&& (set_by_optional || arg->expr->rank != rank)
&& !(isym && isym->id == GFC_ISYM_CONVERSION))
{
- gfc_warning ("%qs at %L is an array and OPTIONAL; IF IT IS "
+ gfc_warning (0, "%qs at %L is an array and OPTIONAL; IF IT IS "
"MISSING, it cannot be the actual argument of an "
"ELEMENTAL procedure unless there is a non-optional "
"argument with the same rank (12.4.1.5)",
@@ -3631,7 +3631,7 @@ resolve_operator (gfc_expr *e)
else
msg = "Inequality comparison for %s at %L";
- gfc_warning (msg, gfc_typename (&op1->ts), &op1->where);
+ gfc_warning (0, msg, gfc_typename (&op1->ts), &op1->where);
}
}
@@ -3964,12 +3964,12 @@ check_dimension (int i, gfc_array_ref *ar, gfc_array_spec *as)
if (compare_bound (ar->start[i], as->lower[i]) == CMP_LT)
{
if (i < as->rank)
- gfc_warning ("Array reference at %L is out of bounds "
+ gfc_warning (0, "Array reference at %L is out of bounds "
"(%ld < %ld) in dimension %d", &ar->c_where[i],
mpz_get_si (ar->start[i]->value.integer),
mpz_get_si (as->lower[i]->value.integer), i+1);
else
- gfc_warning ("Array reference at %L is out of bounds "
+ gfc_warning (0, "Array reference at %L is out of bounds "
"(%ld < %ld) in codimension %d", &ar->c_where[i],
mpz_get_si (ar->start[i]->value.integer),
mpz_get_si (as->lower[i]->value.integer),
@@ -3979,12 +3979,12 @@ check_dimension (int i, gfc_array_ref *ar, gfc_array_spec *as)
if (compare_bound (ar->start[i], as->upper[i]) == CMP_GT)
{
if (i < as->rank)
- gfc_warning ("Array reference at %L is out of bounds "
+ gfc_warning (0, "Array reference at %L is out of bounds "
"(%ld > %ld) in dimension %d", &ar->c_where[i],
mpz_get_si (ar->start[i]->value.integer),
mpz_get_si (as->upper[i]->value.integer), i+1);
else
- gfc_warning ("Array reference at %L is out of bounds "
+ gfc_warning (0, "Array reference at %L is out of bounds "
"(%ld > %ld) in codimension %d", &ar->c_where[i],
mpz_get_si (ar->start[i]->value.integer),
mpz_get_si (as->upper[i]->value.integer),
@@ -4021,7 +4021,7 @@ check_dimension (int i, gfc_array_ref *ar, gfc_array_spec *as)
{
if (compare_bound (AR_START, as->lower[i]) == CMP_LT)
{
- gfc_warning ("Lower array reference at %L is out of bounds "
+ gfc_warning (0, "Lower array reference at %L is out of bounds "
"(%ld < %ld) in dimension %d", &ar->c_where[i],
mpz_get_si (AR_START->value.integer),
mpz_get_si (as->lower[i]->value.integer), i+1);
@@ -4029,7 +4029,7 @@ check_dimension (int i, gfc_array_ref *ar, gfc_array_spec *as)
}
if (compare_bound (AR_START, as->upper[i]) == CMP_GT)
{
- gfc_warning ("Lower array reference at %L is out of bounds "
+ gfc_warning (0, "Lower array reference at %L is out of bounds "
"(%ld > %ld) in dimension %d", &ar->c_where[i],
mpz_get_si (AR_START->value.integer),
mpz_get_si (as->upper[i]->value.integer), i+1);
@@ -4045,7 +4045,7 @@ check_dimension (int i, gfc_array_ref *ar, gfc_array_spec *as)
{
if (compare_bound_mpz_t (as->lower[i], last_value) == CMP_GT)
{
- gfc_warning ("Upper array reference at %L is out of bounds "
+ gfc_warning (0, "Upper array reference at %L is out of bounds "
"(%ld < %ld) in dimension %d", &ar->c_where[i],
mpz_get_si (last_value),
mpz_get_si (as->lower[i]->value.integer), i+1);
@@ -4054,7 +4054,7 @@ check_dimension (int i, gfc_array_ref *ar, gfc_array_spec *as)
}
if (compare_bound_mpz_t (as->upper[i], last_value) == CMP_LT)
{
- gfc_warning ("Upper array reference at %L is out of bounds "
+ gfc_warning (0, "Upper array reference at %L is out of bounds "
"(%ld > %ld) in dimension %d", &ar->c_where[i],
mpz_get_si (last_value),
mpz_get_si (as->upper[i]->value.integer), i+1);
@@ -7195,7 +7195,7 @@ resolve_allocate_deallocate (gfc_code *code, const char *fcn)
if (errmsg)
{
if (!stat)
- gfc_warning ("ERRMSG at %L is useless without a STAT tag",
+ gfc_warning (0, "ERRMSG at %L is useless without a STAT tag",
&errmsg->where);
gfc_check_vardef_context (errmsg, false, false, false,
@@ -7643,7 +7643,7 @@ resolve_select (gfc_code *code, bool select_type)
if (cp->low
&& gfc_check_integer_range (cp->low->value.integer,
case_expr->ts.kind) != ARITH_OK)
- gfc_warning ("Expression in CASE statement at %L is "
+ gfc_warning (0, "Expression in CASE statement at %L is "
"not in the range of %s", &cp->low->where,
gfc_typename (&case_expr->ts));
@@ -7651,7 +7651,7 @@ resolve_select (gfc_code *code, bool select_type)
&& cp->low != cp->high
&& gfc_check_integer_range (cp->high->value.integer,
case_expr->ts.kind) != ARITH_OK)
- gfc_warning ("Expression in CASE statement at %L is "
+ gfc_warning (0, "Expression in CASE statement at %L is "
"not in the range of %s", &cp->high->where,
gfc_typename (&case_expr->ts));
}
@@ -8653,7 +8653,8 @@ resolve_branch (gfc_st_label *label, gfc_code *code)
if (code->here == label)
{
- gfc_warning ("Branch at %L may result in an infinite loop", &code->loc);
+ gfc_warning (0,
+ "Branch at %L may result in an infinite loop", &code->loc);
return;
}
@@ -8860,7 +8861,7 @@ gfc_resolve_assign_in_forall (gfc_code *code, int nvar, gfc_expr **var_expr)
assignment. Emit a warning rather than an error because the
mask could be resolving this problem. */
if (!find_forall_index (code->expr1, forall_index, 0))
- gfc_warning ("The FORALL with index %qs is not used on the "
+ gfc_warning (0, "The FORALL with index %qs is not used on the "
"left side of the assignment at %L and so might "
"cause multiple assignment to this object",
var_expr[n]->symtree->name, &code->expr1->where);
@@ -9702,7 +9703,7 @@ generate_component_assignments (gfc_code **code, gfc_namespace *ns)
(*code)->expr1->rank ? 1 : 0);
if (depth > 1)
{
- gfc_warning ("TODO: type-bound defined assignment(s) at %L not "
+ gfc_warning (0, "TODO: type-bound defined assignment(s) at %L not "
"done because multiple part array references would "
"occur in intermediate expressions.", &(*code)->loc);
return;
@@ -14344,12 +14345,12 @@ warn_unused_fortran_label (gfc_st_label *label)
switch (label->referenced)
{
case ST_LABEL_UNKNOWN:
- gfc_warning ("Label %d at %L defined but not used", label->value,
+ gfc_warning (0, "Label %d at %L defined but not used", label->value,
&label->where);
break;
case ST_LABEL_BAD_TARGET:
- gfc_warning ("Label %d at %L defined but cannot be used",
+ gfc_warning (0, "Label %d at %L defined but cannot be used",
label->value, &label->where);
break;