diff options
author | Janus Weil <janus@gcc.gnu.org> | 2016-11-05 11:35:23 +0100 |
---|---|---|
committer | Janus Weil <janus@gcc.gnu.org> | 2016-11-05 11:35:23 +0100 |
commit | 28ce22e6cb59383f14dd41bf39e22a3a2c0529ad (patch) | |
tree | e9eccca344b97eaf720d26bc2b0d8174d8f680d6 /gcc/fortran/resolve.c | |
parent | d233ee5f50926d58da601e4f8633d98632ced3d2 (diff) | |
download | gcc-28ce22e6cb59383f14dd41bf39e22a3a2c0529ad.zip gcc-28ce22e6cb59383f14dd41bf39e22a3a2c0529ad.tar.gz gcc-28ce22e6cb59383f14dd41bf39e22a3a2c0529ad.tar.bz2 |
re PR fortran/69495 (unused-label warning does not tell which flag triggered it)
2016-11-05 Janus Weil <janus@gcc.gnu.org>
Manuel Lopez-Ibanez <manu@gcc.gnu.org>
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 <janus@gcc.gnu.org>
Dominique d'Humieres <dominiq@lps.ens.fr>
PR fortran/69495
* gfortran.dg/elemental_optional_args_6.f90: Use -Wpedantic flag.
Co-Authored-By: Dominique d'Humieres <dominiq@lps.ens.fr>
Co-Authored-By: Manuel López-Ibáñez <manu@gcc.gnu.org>
From-SVN: r241870
Diffstat (limited to 'gcc/fortran/resolve.c')
-rw-r--r-- | gcc/fortran/resolve.c | 13 |
1 files changed, 8 insertions, 5 deletions
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; |