From 28ce22e6cb59383f14dd41bf39e22a3a2c0529ad Mon Sep 17 00:00:00 2001 From: Janus Weil Date: Sat, 5 Nov 2016 11:35:23 +0100 Subject: re PR fortran/69495 (unused-label warning does not tell which flag triggered it) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 2016-11-05 Janus Weil Manuel Lopez-Ibanez PR fortran/69495 * invoke.texi: Mention -Wpedantic as an alias of -pedantic. * check.c (gfc_check_transfer): Mention responsible flag in warning message. * frontend-passes.c (do_warn_function_elimination): Ditto. * resolve.c (resolve_elemental_actual): Ditto. (resolve_operator): Ditto. (warn_unused_fortran_label): Ditto. * trans-common.c (translate_common): Ditto. 2016-11-05 Janus Weil Dominique d'Humieres PR fortran/69495 * gfortran.dg/elemental_optional_args_6.f90: Use -Wpedantic flag. Co-Authored-By: Dominique d'Humieres Co-Authored-By: Manuel López-Ibáñez From-SVN: r241870 --- gcc/fortran/resolve.c | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) (limited to 'gcc/fortran/resolve.c') diff --git a/gcc/fortran/resolve.c b/gcc/fortran/resolve.c index 14685d2..4e245cf 100644 --- a/gcc/fortran/resolve.c +++ b/gcc/fortran/resolve.c @@ -2140,7 +2140,8 @@ resolve_elemental_actual (gfc_expr *expr, gfc_code *c) && (set_by_optional || arg->expr->rank != rank) && !(isym && isym->id == GFC_ISYM_CONVERSION)) { - gfc_warning (0, "%qs at %L is an array and OPTIONAL; IF IT IS " + gfc_warning (OPT_Wpedantic, + "%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)", @@ -3811,7 +3812,8 @@ resolve_operator (gfc_expr *e) else msg = "Inequality comparison for %s at %L"; - gfc_warning (0, msg, gfc_typename (&op1->ts), &op1->where); + gfc_warning (OPT_Wcompare_reals, msg, + gfc_typename (&op1->ts), &op1->where); } } @@ -15393,12 +15395,13 @@ warn_unused_fortran_label (gfc_st_label *label) switch (label->referenced) { case ST_LABEL_UNKNOWN: - gfc_warning (0, "Label %d at %L defined but not used", label->value, - &label->where); + gfc_warning (OPT_Wunused_label, "Label %d at %L defined but not used", + label->value, &label->where); break; case ST_LABEL_BAD_TARGET: - gfc_warning (0, "Label %d at %L defined but cannot be used", + gfc_warning (OPT_Wunused_label, + "Label %d at %L defined but cannot be used", label->value, &label->where); break; -- cgit v1.1