* method.c (forward_parm): Suppress warn_useless_cast.
From-SVN: r249344
+2017-06-17 Jason Merrill <jason@redhat.com>
+
+ PR c++/70844 - -Wuseless-cast and inheriting constructor.
+ * method.c (forward_parm): Suppress warn_useless_cast.
+
2017-06-16 Jason Merrill <jason@redhat.com>
PR c++/81045 - Wrong type-dependence with auto return type.
type = PACK_EXPANSION_PATTERN (type);
if (TREE_CODE (type) != REFERENCE_TYPE)
type = cp_build_reference_type (type, /*rval=*/true);
+ warning_sentinel w (warn_useless_cast);
exp = build_static_cast (type, exp, tf_warning_or_error);
if (DECL_PACK_P (parm))
exp = make_pack_expansion (exp);
--- /dev/null
+// PR c++/70844
+// { dg-options -Wuseless-cast }
+// { dg-do compile { target c++11 } }
+
+struct base {
+ base (int const &);
+};
+
+struct derived : public base {
+ using base::base;
+};
+
+derived d(0);