if (val == ARITH_UNDERFLOW)
{
- if (gfc_option.warn_underflow)
+ if (warn_underflow)
gfc_warning (gfc_arith_error (val), &x->where);
val = ARITH_OK;
}
if (rc == ARITH_UNDERFLOW)
{
- if (gfc_option.warn_underflow)
+ if (warn_underflow)
gfc_warning (gfc_arith_error (rc), &src->where);
mpfr_set_ui (result->value.real, 0, GFC_RND_MODE);
}
if (rc == ARITH_UNDERFLOW)
{
- if (gfc_option.warn_underflow)
+ if (warn_underflow)
gfc_warning (gfc_arith_error (rc), &src->where);
mpfr_set_ui (mpc_realref (result->value.complex), 0, GFC_RND_MODE);
}
if (rc == ARITH_UNDERFLOW)
{
- if (gfc_option.warn_underflow)
+ if (warn_underflow)
gfc_warning (gfc_arith_error (rc), &src->where);
mpfr_set_ui (result->value.real, 0, GFC_RND_MODE);
}
if (rc == ARITH_UNDERFLOW)
{
- if (gfc_option.warn_underflow)
+ if (warn_underflow)
gfc_warning (gfc_arith_error (rc), &src->where);
mpfr_set_ui (mpc_realref (result->value.complex), 0, GFC_RND_MODE);
}
if (rc == ARITH_UNDERFLOW)
{
- if (gfc_option.warn_underflow)
+ if (warn_underflow)
gfc_warning (gfc_arith_error (rc), &src->where);
mpfr_set_ui (mpc_imagref (result->value.complex), 0, GFC_RND_MODE);
}
return false;
}
- if (!gfc_option.warn_surprising)
+ if (!warn_surprising)
return true;
/* If we can't calculate the sizes, we cannot check any more.
parser-state-stack to find out whether we're in a module. */
static void
-warn_intrinsic_shadow (const gfc_symbol* sym, bool func)
+do_warn_intrinsic_shadow (const gfc_symbol* sym, bool func)
{
bool in_module;
}
/* Warn if this procedure has the same name as an intrinsic. */
- warn_intrinsic_shadow (sym, true);
+ do_warn_intrinsic_shadow (sym, true);
return MATCH_YES;
}
return MATCH_ERROR;
/* Warn if it has the same name as an intrinsic. */
- warn_intrinsic_shadow (sym, false);
+ do_warn_intrinsic_shadow (sym, false);
return MATCH_YES;
}
}
/* This is possibly a typo: x = f() instead of x => f(). */
- if (gfc_option.warn_surprising
+ if (warn_surprising
&& rvalue->expr_type == EXPR_FUNCTION && gfc_expr_attr (rvalue).pointer)
gfc_warning ("POINTER-valued function appears on right-hand side of "
"assignment at %L", &rvalue->where);
if (rvalue->is_boz && lvalue->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'", &rvalue->where,
lvalue->symtree->n.sym->name);
}
/* Warn if it is the LHS pointer may lives longer than the RHS target. */
- if (gfc_option.warn_target_lifetime
+ if (warn_target_lifetime
&& rvalue->expr_type == EXPR_VARIABLE
&& !rvalue->symtree->n.sym->attr.save
&& !attr.pointer && !rvalue->symtree->n.sym->attr.host_assoc
result->ref->u.ar.where = e->where;
result->ref->u.ar.as = symbol->ts.type == BT_CLASS
? CLASS_DATA (symbol)->as : symbol->as;
- if (gfc_option.warn_array_temp)
+ if (warn_array_temporaries)
gfc_warning ("Creating array temporary at %L", &(e->where));
}
/* Warn about function elimination. */
static void
-warn_function_elimination (gfc_expr *e)
+do_warn_function_elimination (gfc_expr *e)
{
if (e->expr_type != EXPR_FUNCTION)
return;
if (newvar == NULL)
newvar = create_var (*ei);
- if (gfc_option.warn_function_elimination)
- warn_function_elimination (*ej);
+ if (warn_function_elimination)
+ do_warn_function_elimination (*ej);
free (*ej);
*ej = gfc_copy_expr (newvar);
int dump_fortran_original;
int dump_fortran_optimized;
- int warn_aliasing;
- int warn_ampersand;
- int warn_function_elimination;
- int warn_implicit_interface;
- int warn_implicit_procedure;
- int warn_line_truncation;
- int warn_surprising;
- int warn_underflow;
- int warn_intrinsic_shadow;
- int warn_array_temp;
- int warn_align_commons;
- int warn_real_q_constant;
- int warn_unused_dummy_argument;
- int warn_zerotrip;
- int warn_realloc_lhs;
- int warn_realloc_lhs_all;
- int warn_compare_reals;
- int warn_target_lifetime;
int max_errors;
int flag_all_intrinsics;
#include "config.h"
#include "system.h"
#include "coretypes.h"
+#include "flags.h"
#include "gfortran.h"
#include "match.h"
#include "arith.h"
formal->name);
return 0;
}
- else if (gfc_option.warn_surprising && where
- && formal->attr.intent != INTENT_IN)
+ else if (warn_surprising && where && formal->attr.intent != INTENT_IN)
gfc_warning ("Passing coarray at %L to allocatable, noncoarray dummy "
"argument '%s', which is invalid if the allocation status"
" is modified", &actual->where, formal->name);
sym->name, where);
return false;
}
- if (gfc_option.warn_implicit_interface)
+ if (warn_implicit_interface)
gfc_warning ("Procedure '%s' called with an implicit interface at %L",
sym->name, where);
- else if (gfc_option.warn_implicit_procedure
- && sym->attr.proc == PROC_UNKNOWN)
+ else if (warn_implicit_procedure && sym->attr.proc == PROC_UNKNOWN)
gfc_warning ("Procedure '%s' called at %L is not explicitly declared",
sym->name, where);
}
if (!check_intents (dummy_args, *ap))
return false;
- if (gfc_option.warn_aliasing)
+ if (warn_aliasing)
check_some_aliasing (dummy_args, *ap);
return true;
/* Warn about calls with an implicit interface. Special case
for calling a ISO_C_BINDING because c_loc and c_funloc
are pseudo-unknown. */
- if (gfc_option.warn_implicit_interface
+ if (warn_implicit_interface
&& comp->attr.if_source == IFSRC_UNKNOWN
&& !comp->attr.is_iso_c)
gfc_warning ("Procedure pointer component '%s' called with an implicit "
return;
check_intents (comp->ts.interface->formal, *ap);
- if (gfc_option.warn_aliasing)
+ if (warn_aliasing)
check_some_aliasing (comp->ts.interface->formal, *ap);
}
if (compare_actual_formal (args, dummy_args, r, !r, NULL))
{
check_intents (dummy_args, *args);
- if (gfc_option.warn_aliasing)
+ if (warn_aliasing)
check_some_aliasing (dummy_args, *args);
return true;
}
gfc_intrinsic_sym* isym;
/* If the warning is disabled, do nothing at all. */
- if (!gfc_option.warn_intrinsic_shadow)
+ if (!warn_intrinsic_shadow)
return;
/* Try to find an intrinsic of the same name. */
@cindex warnings, underflow
@cindex underflow
Produce a warning when numerical constant expressions are
-encountered, which yield an UNDERFLOW during compilation.
+encountered, which yield an UNDERFLOW during compilation. Enabled by default.
@item -Wintrinsic-shadow
@opindex @code{Wintrinsic-shadow}
; Documented in C
Waliasing
-Fortran Warning
+Fortran Warning Var(warn_aliasing) LangEnabledBy(Fortran,Wall)
Warn about possible aliasing of dummy arguments
Walign-commons
-Fortran Warning
+Fortran Warning Var(warn_align_commons) Init(1)
Warn about alignment of COMMON blocks
Wampersand
-Fortran Warning
+Fortran Warning Var(warn_ampersand) LangEnabledBy(Fortran,Wall || Wpedantic)
Warn about missing ampersand in continued character constants
Warray-temporaries
-Fortran Warning
+Fortran Warning Var(warn_array_temporaries)
Warn about creation of array temporaries
Wc-binding-type
Warn about truncated character expressions
Wcompare-reals
-Fortran Warning
+Fortran Warning Var(warn_compare_reals) LangEnabledBy(Fortran,Wextra)
Warn about equality comparisons involving REAL or COMPLEX expressions
Wconversion
Wextra
Fortran Warning
-Print extra (possibly unwanted) warnings
+; Documented in common
Wfunction-elimination
-Fortran Warning
+Fortran Warning Var(warn_function_elimination)
Warn about function call elimination
Wimplicit-interface
-Fortran Warning
+Fortran Warning Var(warn_implicit_interface)
Warn about calls with implicit interface
Wimplicit-procedure
-Fortran Warning
+Fortran Warning Var(warn_implicit_procedure)
Warn about called procedures not explicitly declared
Wline-truncation
-Fortran Warning
+Fortran Warning Var(warn_line_truncation) LangEnabledBy(Fortran,Wall)
Warn about truncated source lines
Wintrinsics-std
Fortran Var(warn_intrinsics_std) Warning LangEnabledBy(Fortran,Wall)
Warn on intrinsics not part of the selected standard
+Wmaybe-uninitialized
+Fortran LangEnabledBy(Fortran,Wall)
+; Documented in common.opt
+
Wmissing-include-dirs
Fortran
; Documented in C/C++
; Documented in common.opt
Wreal-q-constant
-Fortran Warning
+Fortran Warning Var(warn_real_q_constant) LangEnabledBy(Fortran,Wall)
Warn about real-literal-constants with 'q' exponent-letter
Wrealloc-lhs
-Fortran Warning
+Fortran Warning Var(warn_realloc_lhs) LangEnabledBy(Fortran,Wrealloc-lhs-all)
Warn when a left-hand-side array variable is reallocated
Wrealloc-lhs-all
-Fortran Warning
+Fortran Warning Var(warn_realloc_lhs_all)
Warn when a left-hand-side variable is reallocated
Wtarget-lifetime
-Fortran Warning
+Fortran Warning Var(warn_target_lifetime) LangEnabledBy(Fortran,Wall)
Warn if the pointer in a pointer assignment might outlive its target
Wreturn-type
-Fortran Warning
+Fortran Warning LangEnabledBy(Fortran,Wall)
; Documented in C
Wsurprising
-Fortran Warning
+Fortran Warning Var(warn_surprising) LangEnabledBy(Fortran,Wall)
Warn about \"suspicious\" constructs
Wtabs
Permit nonconforming uses of the tab character
Wunderflow
-Fortran Warning
+Fortran Warning Var(warn_underflow) Init(1)
Warn about underflow of numerical constant expressions
+Wuninitialized
+Fortran LangEnabledBy(Fortran,Wall)
+; Documented in common.opt
+
Wintrinsic-shadow
-Fortran Warning
+Fortran Warning Var(warn_intrinsic_shadow) LangEnabledBy(Fortran,Wall)
Warn if a user-procedure has the same name as an intrinsic
+Wunused
+LangEnabledBy(Fortran,Wall)
+; Documented in common.opt
+
Wunused-dummy-argument
-Fortran Warning
+Fortran Warning Var(warn_unused_dummy_argument) LangEnabledBy(Fortran,Wall)
Warn about unused dummy arguments.
Wzerotrip
-Fortran Warning
+Fortran Warning Var(warn_zerotrip) LangEnabledBy(Fortran,Wall)
Warn about zero-trip DO loops
cpp
gfc_option.dump_fortran_original = 0;
gfc_option.dump_fortran_optimized = 0;
- gfc_option.warn_aliasing = 0;
- gfc_option.warn_ampersand = 0;
- gfc_option.warn_array_temp = 0;
- gfc_option.warn_function_elimination = 0;
- gfc_option.warn_implicit_interface = 0;
- gfc_option.warn_line_truncation = 0;
- gfc_option.warn_surprising = 0;
- gfc_option.warn_underflow = 1;
- gfc_option.warn_intrinsic_shadow = 0;
- gfc_option.warn_align_commons = 1;
- gfc_option.warn_real_q_constant = 0;
- gfc_option.warn_unused_dummy_argument = 0;
- gfc_option.warn_zerotrip = 0;
- gfc_option.warn_realloc_lhs = 0;
- gfc_option.warn_realloc_lhs_all = 0;
- gfc_option.warn_compare_reals = 0;
- gfc_option.warn_target_lifetime = 0;
gfc_option.max_errors = 25;
gfc_option.flag_all_intrinsics = 0;
if (!gfc_option.flag_automatic)
gfc_option.flag_max_stack_var_size = 0;
- if (pedantic)
- gfc_option.warn_ampersand = 1;
-
/* Optimization implies front end optimization, unless the user
specified it directly. */
if (gfc_option.flag_frontend_optimize == -1)
gfc_option.flag_frontend_optimize = optimize;
- if (gfc_option.warn_realloc_lhs_all)
- gfc_option.warn_realloc_lhs = 1;
-
gfc_cpp_post_options ();
return gfc_cpp_preprocess_only ();
}
-/* Set the options for -Wall. */
-
-static void
-set_Wall (int setting)
-{
- gfc_option.warn_aliasing = setting;
- gfc_option.warn_ampersand = setting;
- gfc_option.warn_line_truncation = setting;
- gfc_option.warn_surprising = setting;
- gfc_option.warn_underflow = setting;
- gfc_option.warn_intrinsic_shadow = setting;
- gfc_option.warn_real_q_constant = setting;
- gfc_option.warn_unused_dummy_argument = setting;
- gfc_option.warn_target_lifetime = setting;
- gfc_option.warn_zerotrip = setting;
-
- warn_return_type = setting;
- warn_uninitialized = setting;
- warn_maybe_uninitialized = setting;
-}
-
-/* Set the options for -Wextra. */
-
-static void
-set_Wextra (int setting)
-{
- gfc_option.warn_compare_reals = setting;
-}
-
static void
gfc_handle_module_path_options (const char *arg)
{
result = false;
break;
- case OPT_Wall:
- handle_generated_option (&global_options, &global_options_set,
- OPT_Wunused, NULL, value,
- gfc_option_lang_mask (), kind, loc,
- handlers, global_dc);
- set_Wall (value);
- break;
-
- case OPT_Waliasing:
- gfc_option.warn_aliasing = value;
- break;
-
- case OPT_Wampersand:
- gfc_option.warn_ampersand = value;
- break;
-
- case OPT_Warray_temporaries:
- gfc_option.warn_array_temp = value;
- break;
-
- case OPT_Wcompare_reals:
- gfc_option.warn_compare_reals = value;
- break;
-
- case OPT_Wextra:
- set_Wextra (value);
- break;
-
- case OPT_Wfunction_elimination:
- gfc_option.warn_function_elimination = value;
- break;
-
- case OPT_Wimplicit_interface:
- gfc_option.warn_implicit_interface = value;
- break;
-
- case OPT_Wimplicit_procedure:
- gfc_option.warn_implicit_procedure = value;
- break;
-
- case OPT_Wline_truncation:
- gfc_option.warn_line_truncation = value;
- break;
-
- case OPT_Wrealloc_lhs:
- gfc_option.warn_realloc_lhs = value;
- break;
-
- case OPT_Wrealloc_lhs_all:
- gfc_option.warn_realloc_lhs_all = value;
- break;
-
- case OPT_Wreturn_type:
- warn_return_type = value;
- break;
-
- case OPT_Wsurprising:
- gfc_option.warn_surprising = value;
- break;
-
- case OPT_Wtarget_lifetime:
- gfc_option.warn_target_lifetime = value;
- break;
-
- case OPT_Wunderflow:
- gfc_option.warn_underflow = value;
- break;
-
- case OPT_Wintrinsic_shadow:
- gfc_option.warn_intrinsic_shadow = value;
- break;
-
- case OPT_Walign_commons:
- gfc_option.warn_align_commons = value;
- break;
-
- case OPT_Wreal_q_constant:
- gfc_option.warn_real_q_constant = value;
- break;
-
- case OPT_Wunused_dummy_argument:
- gfc_option.warn_unused_dummy_argument = value;
- break;
-
- case OPT_Wzerotrip:
- gfc_option.warn_zerotrip = value;
- break;
-
case OPT_fall_intrinsics:
gfc_option.flag_all_intrinsics = 1;
break;
gfc_option.max_continue_fixed = 19;
gfc_option.max_continue_free = 39;
gfc_option.max_identifier_length = 31;
- gfc_option.warn_ampersand = 1;
+ warn_ampersand = 1;
warn_tabs = 1;
break;
| GFC_STD_F2003 | GFC_STD_F95 | GFC_STD_F2008_OBS;
gfc_option.warn_std = GFC_STD_F95_OBS;
gfc_option.max_identifier_length = 63;
- gfc_option.warn_ampersand = 1;
+ warn_ampersand = 1;
warn_tabs = 1;
break;
| GFC_STD_F2003 | GFC_STD_F95 | GFC_STD_F2008 | GFC_STD_F2008_OBS;
gfc_option.warn_std = GFC_STD_F95_OBS | GFC_STD_F2008_OBS;
gfc_option.max_identifier_length = 63;
- gfc_option.warn_ampersand = 1;
+ warn_ampersand = 1;
warn_tabs = 1;
break;
| GFC_STD_F2008_TS;
gfc_option.warn_std = GFC_STD_F95_OBS | GFC_STD_F2008_OBS;
gfc_option.max_identifier_length = 63;
- gfc_option.warn_ampersand = 1;
+ warn_ampersand = 1;
warn_tabs = 1;
break;
if (!gfc_notify_std (GFC_STD_GNU, "exponent-letter 'q' in "
"real-literal-constant at %C"))
return MATCH_ERROR;
- else if (gfc_option.warn_real_q_constant)
+ else if (warn_real_q_constant)
gfc_warning("Extension: exponent-letter 'q' in real-literal-constant "
"at %C");
}
goto cleanup;
case ARITH_UNDERFLOW:
- if (gfc_option.warn_underflow)
+ if (warn_underflow)
gfc_warning ("Real constant underflows its kind at %C");
mpfr_set_ui (e->value.real, 0, GFC_RND_MODE);
break;
match_string_constant (gfc_expr **result)
{
char name[GFC_MAX_SYMBOL_LEN + 1], peek;
- int i, kind, length, warn_ampersand, ret;
+ int i, kind, length, save_warn_ampersand, ret;
locus old_locus, start_locus;
gfc_symbol *sym;
gfc_expr *e;
/* We disable the warning for the following loop as the warning has already
been printed in the loop above. */
- warn_ampersand = gfc_option.warn_ampersand;
- gfc_option.warn_ampersand = 0;
+ save_warn_ampersand = warn_ampersand;
+ warn_ampersand = 0;
p = e->value.character.string;
for (i = 0; i < length; i++)
}
*p = '\0'; /* TODO: C-style string is for development/debug purposes. */
- gfc_option.warn_ampersand = warn_ampersand;
+ warn_ampersand = save_warn_ampersand;
next_string_char (delimiter, &ret);
if (ret != -1)
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);
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;
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);
&& 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);
/* 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);
}
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);
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);
}
/* 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);
/* 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);
}
/* Check to see if the continuation line was truncated. */
- if (gfc_option.warn_line_truncation && gfc_current_locus.lb != NULL
+ if (warn_line_truncation && gfc_current_locus.lb != NULL
&& gfc_current_locus.lb->truncated)
{
int maxlen = gfc_option.free_line_length;
if (in_string)
{
gfc_current_locus.nextc--;
- if (gfc_option.warn_ampersand && in_string == INSTRING_WARN)
+ if (warn_ampersand && in_string == INSTRING_WARN)
gfc_warning ("Missing '&' in continued character "
"constant at %C");
}
goto done;
/* Check to see if the continuation line was truncated. */
- if (gfc_option.warn_line_truncation && gfc_current_locus.lb != NULL
+ if (warn_line_truncation && gfc_current_locus.lb != NULL
&& gfc_current_locus.lb->truncated)
{
gfc_current_locus.lb->truncated = 0;
return &gfc_bad_expr;
}
- if (ascii && gfc_option.warn_surprising
- && mpz_cmp_si (e->value.integer, 127) > 0)
+ if (ascii && warn_surprising && mpz_cmp_si (e->value.integer, 127) > 0)
gfc_warning ("Argument of %s function at %L outside of range [0,127]",
name, &e->where);
index = e->value.character.string[0];
- if (gfc_option.warn_surprising && index > 127)
+ if (warn_surprising && index > 127)
gfc_warning ("Argument of IACHAR function at %L outside of range 0..127",
&e->where);
gcc_assert (ss->dimen > 0);
gcc_assert (ss->loop->dimen == ss->dimen);
- if (gfc_option.warn_array_temp && where)
+ if (warn_array_temporaries && where)
gfc_warning ("Creating array temporary at %L", where);
/* Set the lower bound to zero. */
stride = gfc_index_one_node;
- if (gfc_option.warn_array_temp)
+ if (warn_array_temporaries)
gfc_warning ("Creating array temporary at %L", &loc);
}
}
/* Repack the array. */
- if (gfc_option.warn_array_temp)
+ if (warn_array_temporaries)
{
if (fsym)
gfc_warning ("Creating array temporary at %L for argument '%s'",
/* The required offset conflicts with previous alignment
requirements. Insert padding immediately before this
segment. */
- if (gfc_option.warn_align_commons)
+ if (warn_align_commons)
{
if (strcmp (common->name, BLANK_COMMON_NAME))
gfc_warning ("Padding of %d bytes required before '%s' in "
return;
}
- if (common_segment->offset != 0 && gfc_option.warn_align_commons)
+ if (common_segment->offset != 0 && warn_align_commons)
{
if (strcmp (common->name, BLANK_COMMON_NAME))
gfc_warning ("COMMON '%s' at %L requires %d bytes of padding; "
else if (sym->attr.dummy && !sym->attr.in_namelist)
{
/* INTENT(out) dummy arguments are likely meant to be set. */
- if (gfc_option.warn_unused_dummy_argument
- && sym->attr.intent == INTENT_OUT)
+ if (warn_unused_dummy_argument && sym->attr.intent == INTENT_OUT)
{
if (sym->ts.type != BT_DERIVED)
gfc_warning ("Dummy argument '%s' at %L was declared "
if (sym->backend_decl != NULL_TREE)
TREE_NO_WARNING(sym->backend_decl) = 1;
}
- else if (gfc_option.warn_unused_dummy_argument)
+ else if (warn_unused_dummy_argument)
{
gfc_warning ("Unused dummy argument '%s' at %L", sym->name,
&sym->declared_at);
{
if (!sym->attr.referenced)
{
- if (gfc_option.warn_unused_dummy_argument)
+ if (warn_unused_dummy_argument)
gfc_warning ("Unused dummy argument '%s' at %L", sym->name,
&sym->declared_at);
}
static void
realloc_lhs_warning (bt type, bool array, locus *where)
{
- if (array && type != BT_CLASS && type != BT_DERIVED
- && gfc_option.warn_realloc_lhs)
+ if (array && type != BT_CLASS && type != BT_DERIVED && warn_realloc_lhs)
gfc_warning ("Code for reallocating the allocatable array at %L will "
"be added", where);
- else if (gfc_option.warn_realloc_lhs_all)
+ else if (warn_realloc_lhs_all)
gfc_warning ("Code for reallocating the allocatable variable at %L "
"will be added", where);
}
{
tmp = gfc_build_addr_expr (NULL_TREE, argse.expr);
- if (gfc_option.warn_array_temp)
+ if (warn_array_temporaries)
gfc_warning ("Creating array temporary at %L", &expr->where);
source = build_call_expr_loc (input_location,