diff options
author | Tobias Burnus <burnus@gcc.gnu.org> | 2014-11-30 09:33:25 +0100 |
---|---|---|
committer | Tobias Burnus <burnus@gcc.gnu.org> | 2014-11-30 09:33:25 +0100 |
commit | 73e42eef1617bcfa5b333bdb563efeea1626d112 (patch) | |
tree | c5726afc5d984361b858ab33670a6a95ce59cab1 /gcc/fortran/resolve.c | |
parent | daa38cc13da3de5a9216d5e8f05736b326ac14ae (diff) | |
download | gcc-73e42eef1617bcfa5b333bdb563efeea1626d112.zip gcc-73e42eef1617bcfa5b333bdb563efeea1626d112.tar.gz gcc-73e42eef1617bcfa5b333bdb563efeea1626d112.tar.bz2 |
gfortran.h (gfc_option_t): Remove warn_aliasing,
2014-11-30 Tobias Burnus <burnus@net-b.de>
* gfortran.h (gfc_option_t): Remove warn_aliasing,
* warn_ampersand,
warn_function_elimination, warn_implicit_interface,
warn_implicit_procedure, warn_line_truncation,
warn_surprising, warn_underflow, warn_intrinsic_shadow,
warn_array_temp, warn_align_commons, warn_real_q_constant,
warn_unused_dummy_argument, warn_zerotrip, warn_realloc_lhs,
warn_realloc_lhs_all, warn_compare_reals, warn_target_lifetime.
* arith.c (check_result, gfc_real2real, gfc_real2complex,
gfc_complex2real, gfc_complex2complex): Honor changed
variable names.
* check.c (gfc_check_transfer): Ditto.
* expr.c (gfc_check_assign, gfc_check_pointer_assign): Ditto.
* interface.c (compare_parameter, gfc_procedure_use,
* gfc_ppc_use,
gfc_arglist_matches_symbol): Ditto.
* intrinsic.c (gfc_warn_intrinsic_shadow): Ditto.
* primary.c (match_real_constant, match_string_constant): Ditto.
* resolve.c (gfc_resolve_intrinsic, resolve_operator,
gfc_resolve_iterator, resolve_select, resolve_ordinary_assign,
resolve_charlen, gfc_resolve_finalizers): Ditto.
* scanner.c (gfc_next_char_literal): Ditto.
* simplify.c (simplify_achar_char, gfc_simplify_iachar): Ditto.
* trans-array.c (gfc_trans_create_temp_array,
gfc_trans_dummy_array_bias, gfc_conv_array_parameter): Ditto.
* trans-common.c (translate_common):
* trans-decl.c (generate_local_decl): Ditto.
* trans-expr.c (realloc_lhs_warning): Ditto.
* trans-intrinsic.c (gfc_conv_intrinsic_transfer): Ditto.
* decl.c (do_warn_intrinsic_shadow): Ditto. Renamed from
warn_intrinsic_shadow.
* frontend-passes.c (do_warn_function_elimination): Honor
changed variable names. Renamed from do_warn_function_elimination.
* invoke.texi (Wunderflow): Document that it is enabled by
* default.
* lang.opt (Waliasing, Walign-commons, Warray-temporaries,
Wcompare-reals, Wfunction-elimination, Wimplicit-interface,
Wimplicit-procedure, Wline-truncation, Wreal-q-constant, Wrealloc-lhs,
Wrealloc-lhs-all, Wtarget-lifetime, Wsurprising, Wunderflow,
Wintrinsic-shadow, Wunused-dummy-argument, Wzerotrip): Use Var(),
add Init() and LangEnabledBy() were required.
(Wmaybe-uninitialized, Wreturn-type, Wuninitialized): Add
LangEnabledBy.
* options.c (gfc_init_options, gfc_post_options,
* gfc_handle_option):
Remove options handled in lang.opt; handle renaming.
(set_Wall, set_Wextra): Remove.
From-SVN: r218188
Diffstat (limited to 'gcc/fortran/resolve.c')
-rw-r--r-- | gcc/fortran/resolve.c | 20 |
1 files changed, 9 insertions, 11 deletions
diff --git a/gcc/fortran/resolve.c b/gcc/fortran/resolve.c index 08bbda4..9d7d3c2 100644 --- a/gcc/fortran/resolve.c +++ b/gcc/fortran/resolve.c @@ -1643,7 +1643,7 @@ gfc_resolve_intrinsic (gfc_symbol *sym, locus *loc) if (isym && !sym->attr.subroutine) { - if (sym->ts.type != BT_UNKNOWN && gfc_option.warn_surprising + if (sym->ts.type != BT_UNKNOWN && warn_surprising && !sym->attr.implicit_type) gfc_warning ("Type specified for intrinsic function '%s' at %L is" " ignored", sym->name, &sym->declared_at); @@ -3571,7 +3571,7 @@ resolve_operator (gfc_expr *e) e->ts.type = BT_LOGICAL; e->ts.kind = gfc_default_logical_kind; - if (gfc_option.warn_compare_reals) + if (warn_compare_reals) { gfc_intrinsic_op op = e->value.op.op; @@ -6331,8 +6331,7 @@ gfc_resolve_iterator (gfc_iterator *iter, bool real_ok, bool own_scope) sgn = mpfr_sgn (iter->step->value.real); cmp = mpfr_cmp (iter->end->value.real, iter->start->value.real); } - if (gfc_option.warn_zerotrip && - ((sgn > 0 && cmp < 0) || (sgn < 0 && cmp > 0))) + if (warn_zerotrip && ((sgn > 0 && cmp < 0) || (sgn < 0 && cmp > 0))) gfc_warning ("DO loop at %L will be executed zero times" " (use -Wno-zerotrip to suppress)", &iter->step->where); @@ -7709,7 +7708,7 @@ resolve_select (gfc_code *code, bool select_type) && cp->low != cp->high && gfc_compare_expr (cp->low, cp->high, INTRINSIC_GT) > 0) { - if (gfc_option.warn_surprising) + if (warn_surprising) gfc_warning ("Range specification at %L can never " "be matched", &cp->where); @@ -7811,8 +7810,7 @@ resolve_select (gfc_code *code, bool select_type) /* More than two cases is legal but insane for logical selects. Issue a warning for it. */ - if (gfc_option.warn_surprising && type == BT_LOGICAL - && ncases > 2) + if (warn_surprising && type == BT_LOGICAL && ncases > 2) gfc_warning ("Logical SELECT CASE block at %L has more that two cases", &code->loc); } @@ -9182,7 +9180,7 @@ resolve_ordinary_assign (gfc_code *code, gfc_namespace *ns) if (rhs->is_boz && lhs->ts.type != BT_INTEGER) { int rc; - if (gfc_option.warn_surprising) + if (warn_surprising) gfc_warning ("BOZ literal at %L is bitwise transferred " "non-integer symbol '%s'", &code->loc, lhs->symtree->n.sym->name); @@ -10483,7 +10481,7 @@ resolve_charlen (gfc_charlen *cl) value, the length of character entities declared is zero." */ if (cl->length && !gfc_extract_int (cl->length, &i) && i < 0) { - if (gfc_option.warn_surprising) + if (warn_surprising) gfc_warning_now ("CHARACTER variable at %L has negative length %d," " the length has been set to zero", &cl->length->where, i); @@ -11499,7 +11497,7 @@ gfc_resolve_finalizers (gfc_symbol* derived, bool *finalizable) } /* Warn if the procedure is non-scalar and not assumed shape. */ - if (gfc_option.warn_surprising && arg->as && arg->as->rank != 0 + if (warn_surprising && arg->as && arg->as->rank != 0 && arg->as->type != AS_ASSUMED_SHAPE) gfc_warning ("Non-scalar FINAL procedure at %L should have assumed" " shape argument", &arg->declared_at); @@ -11558,7 +11556,7 @@ error: /* Warn if we haven't seen a scalar finalizer procedure (but we know there were nodes in the list, must have been for arrays. It is surely a good idea to have a scalar version there if there's something to finalize. */ - if (gfc_option.warn_surprising && result && !seen_scalar) + if (warn_surprising && result && !seen_scalar) gfc_warning ("Only array FINAL procedures declared for derived type '%s'" " defined at %L, suggest also scalar one", derived->name, &derived->declared_at); |