https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105569
--- Comment #3 from Marek Polacek <mpolacek at gcc dot gnu.org> --- Actually this is probably a better fix; I don't suppose we want to issue warnings for the compiler-generated POINTER_PLUS_EXPRs. --- a/gcc/cp/class.cc +++ b/gcc/cp/class.cc @@ -518,6 +518,8 @@ build_base_path (enum tree_code code, expr = build1 (NOP_EXPR, ptr_target_type, expr); + suppress_warning (expr, OPT_Waddress); + indout: if (!want_pointer) {