method.c (build_stub_object): Use CONVERT_EXPR.
authorJason Merrill <jason@redhat.com>
Tue, 30 Sep 2014 17:12:29 +0000 (13:12 -0400)
committerJason Merrill <jason@gcc.gnu.org>
Tue, 30 Sep 2014 17:12:29 +0000 (13:12 -0400)
* method.c (build_stub_object): Use CONVERT_EXPR.
* tree.c (build_dummy_object): Likewise.
(is_dummy_object): Adjust.

From-SVN: r215736

gcc/cp/ChangeLog
gcc/cp/method.c
gcc/cp/tree.c

index 00d3fe277f8640afe8ba64e089f83b83cf776eb2..2cc37928c399ae16aacdbccb12c293bd4b040dd7 100644 (file)
@@ -1,5 +1,9 @@
 2014-09-30  Jason Merrill  <jason@redhat.com>
 
+       * method.c (build_stub_object): Use CONVERT_EXPR.
+       * tree.c (build_dummy_object): Likewise.
+       (is_dummy_object): Adjust.
+
        * cp-tree.h (cp_trait_kind): Remove CPTK_IS_CONVERTIBLE_TO.
        * cxx-pretty-print.c (pp_cxx_trait_expression): Likewise.
        * semantics.c (trait_expr_value): Likewise.
index d0e010500f83b088a4c48d4655a9e5e55da25f3d..b427d65d642955d6ac4a0ecb9e78d87a32845874 100644 (file)
@@ -852,7 +852,7 @@ build_stub_type (tree type, int quals, bool rvalue)
 static tree
 build_stub_object (tree reftype)
 {
-  tree stub = build1 (NOP_EXPR, reftype, integer_one_node);
+  tree stub = build1 (CONVERT_EXPR, reftype, integer_one_node);
   return convert_from_reference (stub);
 }
 
index a7bb38b97c1156dc7fefeda32c6596ec76c9a6ae..2247eb5baa8689f95fed05dccde1aeb990f53fff 100644 (file)
@@ -2979,7 +2979,7 @@ member_p (const_tree decl)
 tree
 build_dummy_object (tree type)
 {
-  tree decl = build1 (NOP_EXPR, build_pointer_type (type), void_node);
+  tree decl = build1 (CONVERT_EXPR, build_pointer_type (type), void_node);
   return cp_build_indirect_ref (decl, RO_NULL, tf_warning_or_error);
 }
 
@@ -3028,7 +3028,7 @@ is_dummy_object (const_tree ob)
 {
   if (INDIRECT_REF_P (ob))
     ob = TREE_OPERAND (ob, 0);
-  return (TREE_CODE (ob) == NOP_EXPR
+  return (TREE_CODE (ob) == CONVERT_EXPR
          && TREE_OPERAND (ob, 0) == void_node);
 }