aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp
diff options
context:
space:
mode:
authorPaolo Carlini <paolo.carlini@oracle.com>2014-12-11 15:45:32 +0000
committerPaolo Carlini <paolo@gcc.gnu.org>2014-12-11 15:45:32 +0000
commitb214b73391d67f9a0dbb8807912330289973982a (patch)
treec1b865cb590711a15484cc3966a0244298f223b9 /gcc/cp
parent4011a145dc49724a0dc2a34bd1826e232954d682 (diff)
downloadgcc-b214b73391d67f9a0dbb8807912330289973982a.zip
gcc-b214b73391d67f9a0dbb8807912330289973982a.tar.gz
gcc-b214b73391d67f9a0dbb8807912330289973982a.tar.bz2
typeck.c (maybe_warn_about_useless_cast): Remove unnecessary conditional.
2014-12-11 Paolo Carlini <paolo.carlini@oracle.com> * typeck.c (maybe_warn_about_useless_cast): Remove unnecessary conditional. From-SVN: r218629
Diffstat (limited to 'gcc/cp')
-rw-r--r--gcc/cp/ChangeLog5
-rw-r--r--gcc/cp/typeck.c6
2 files changed, 5 insertions, 6 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog
index c8a66b0..0442ef3 100644
--- a/gcc/cp/ChangeLog
+++ b/gcc/cp/ChangeLog
@@ -1,3 +1,8 @@
+2014-12-11 Paolo Carlini <paolo.carlini@oracle.com>
+
+ * typeck.c (maybe_warn_about_useless_cast): Remove unnecessary
+ conditional.
+
2014-12-10 Kai Tietz <ktietz@redhat.com>
PR c++/64127
diff --git a/gcc/cp/typeck.c b/gcc/cp/typeck.c
index 2abff6b..dd60d98 100644
--- a/gcc/cp/typeck.c
+++ b/gcc/cp/typeck.c
@@ -6363,12 +6363,6 @@ maybe_warn_about_useless_cast (tree type, tree expr, tsubst_flags_t complain)
if (warn_useless_cast
&& complain & tf_warning)
{
- /* In C++14 mode, this interacts badly with force_paren_expr. And it
- isn't necessary in any mode, because the code below handles
- glvalues properly. For 4.9, just skip it in C++14 mode. */
- if (cxx_dialect < cxx14 && REFERENCE_REF_P (expr))
- expr = TREE_OPERAND (expr, 0);
-
if ((TREE_CODE (type) == REFERENCE_TYPE
&& (TYPE_REF_IS_RVALUE (type)
? xvalue_p (expr) : real_lvalue_p (expr))