(unsigned long long) bndrng[1].to_uhwi ());
}
+ auto_diagnostic_group d;
+
const tree maxobjsize = max_object_size ();
const wide_int maxsiz = wi::to_wide (maxobjsize);
if (expr)
maybe = false;
}
+ auto_diagnostic_group d;
if (tree_int_cst_lt (maxobjsize, bndrng[0]))
{
if (bndrng[0] == bndrng[1])
&& warning_suppressed_p (pad->dst.ref, opt)))
return false;
+ auto_diagnostic_group d;
location_t loc = get_location (exp);
bool warned = false;
if (dstwrite == slen && at_least_one)
const bool read
= mode == access_read_only || mode == access_read_write;
const bool maybe = pad && pad->dst.parmarray;
+ auto_diagnostic_group d;
if (warn_for_access (loc, func, exp, opt, range, slen, false, read,
maybe))
{
(long long)aref.offrng[1].to_shwi ());
}
+ auto_diagnostic_group d;
if (!warning_at (loc, OPT_Wfree_nonheap_object,
"%qD called on pointer %qE with nonzero offset%s",
dealloc_decl, aref.ref, offstr))
if (!is_valid)
{
bool warned = false;
+ auto_diagnostic_group d;
if (const char *modname = memmodel_name (sucs))
warned = warning_at (loc, OPT_Winvalid_memory_model,
"invalid memory model %qs for %qD",
{
/* If both memory model arguments are valid but their combination
is not, use their names in the warning. */
+ auto_diagnostic_group d;
if (!warning_at (loc, OPT_Winvalid_memory_model,
"invalid failure memory model %qs for %qD",
failname, fndecl))
{
/* If both memory model arguments are valid but their combination
is not, use their names in the warning. */
+ auto_diagnostic_group d;
if (!warning_at (loc, OPT_Winvalid_memory_model,
"failure memory model %qs cannot be stronger "
"than success memory model %qs for %qD",
if (DECL_P (ref) || EXPR_P (ref))
{
/* Diagnose freeing a declared object. */
- if (aref.ref_declared ()
- && warning_at (loc, OPT_Wfree_nonheap_object,
- "%qD called on unallocated object %qD",
- dealloc_decl, ref))
+ if (aref.ref_declared ())
{
- inform (get_location (ref), "declared here");
- return;
+ auto_diagnostic_group d;
+ if (warning_at (loc, OPT_Wfree_nonheap_object,
+ "%qD called on unallocated object %qD",
+ dealloc_decl, ref))
+ {
+ inform (get_location (ref), "declared here");
+ return;
+ }
}
/* Diagnose freeing a pointer that includes a positive offset.
}
else if (CONSTANT_CLASS_P (ref))
{
+ auto_diagnostic_group d;
if (warning_at (loc, OPT_Wfree_nonheap_object,
"%qD called on a pointer to an unallocated "
"object %qE", dealloc_decl, ref))
const tree inval_decl = gimple_call_fndecl (inval_stmt);
+ auto_diagnostic_group d;
if ((ref && warning_at (use_loc, OPT_Wuse_after_free,
(maybe
? G_("pointer %qE may be used after %qD")
if (DECL_NAME (var))
{
+ auto_diagnostic_group d;
if ((ref
&& warning_at (use_loc, OPT_Wdangling_pointer_,
(maybe
if (!is_auto_decl (rhs_ref.ref))
continue;
+ auto_diagnostic_group d;
location_t loc = gimple_location (stmt);
if (warning_at (loc, OPT_Wdangling_pointer_,
"storing the address of local variable %qD in %qE",