aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp/method.c
diff options
context:
space:
mode:
authorJason Merrill <jason@redhat.com>2017-06-18 00:25:15 -0400
committerJason Merrill <jason@gcc.gnu.org>2017-06-18 00:25:15 -0400
commit5ebcc5477a59dbe51c7e1130a2b751a2a1d89574 (patch)
tree168d552a3d488de5b1d9debb8a918f975d0e69c5 /gcc/cp/method.c
parent28ab5c5ea9510b1937d4bd0e9343372d67f83610 (diff)
downloadgcc-5ebcc5477a59dbe51c7e1130a2b751a2a1d89574.zip
gcc-5ebcc5477a59dbe51c7e1130a2b751a2a1d89574.tar.gz
gcc-5ebcc5477a59dbe51c7e1130a2b751a2a1d89574.tar.bz2
PR c++/70844 - -Wuseless-cast and inheriting constructor.
* method.c (forward_parm): Suppress warn_useless_cast. From-SVN: r249344
Diffstat (limited to 'gcc/cp/method.c')
-rw-r--r--gcc/cp/method.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/gcc/cp/method.c b/gcc/cp/method.c
index 9541fcb..fe4b2af 100644
--- a/gcc/cp/method.c
+++ b/gcc/cp/method.c
@@ -486,6 +486,7 @@ forward_parm (tree parm)
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);