diagnostic_classify_diagnostic (dc, opt_index, (diagnostic_t) kind, loc);
if (imply)
{
+ /* -Werror=foo implies -Wfoo. */
const struct cl_option *option = &cl_options[opt_index];
+ HOST_WIDE_INT value = 1;
- /* -Werror=foo implies -Wfoo. */
if (option->var_type == CLVC_INTEGER
|| option->var_type == CLVC_ENUM
|| option->var_type == CLVC_SIZE)
{
- HOST_WIDE_INT value = 1;
if (arg && *arg == '\0' && !option->cl_missing_ok)
arg = NULL;
return;
}
}
-
- handle_generated_option (opts, opts_set,
- opt_index, arg, value, lang_mask,
- kind, loc, handlers, false, dc);
}
+
+ handle_generated_option (opts, opts_set,
+ opt_index, arg, value, lang_mask,
+ kind, loc, handlers, false, dc);
}
}
--- /dev/null
+// PR c++/106213
+// { dg-additional-options -Werror=deprecated-copy-dtor }
+// { dg-prune-output "warnings being treated as errors" }
+
+struct s {
+ int* i;
+ s();
+ ~s() { delete i; }
+};
+
+
+void bar(){
+ s instance;
+ s instance2 = instance;
+ // { dg-error "deprecated-copy-dtor" "" { target c++11 } .-1 }
+}