aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/cp')
-rw-r--r--gcc/cp/decl.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/gcc/cp/decl.cc b/gcc/cp/decl.cc
index 66e7d9f..6b1c4a2 100644
--- a/gcc/cp/decl.cc
+++ b/gcc/cp/decl.cc
@@ -8407,7 +8407,7 @@ cp_finish_decl (tree decl, tree init, bool init_const_expr_p,
if (!DECL_EXTERNAL (decl)
&& !TREE_STATIC (decl)
&& decl == tree_strip_any_location_wrapper (init)
- && !warn_init_self)
+ && !warning_enabled_at (DECL_SOURCE_LOCATION (decl), OPT_Winit_self))
suppress_warning (decl, OPT_Winit_self);
}