From: jason Date: Tue, 30 Sep 2014 17:12:29 +0000 (+0000) Subject: * method.c (build_stub_object): Use CONVERT_EXPR. X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=ff4e692aa33014470db336e5bdd46e9d9450de4d;p=thirdparty%2Fgcc.git * method.c (build_stub_object): Use CONVERT_EXPR. * tree.c (build_dummy_object): Likewise. (is_dummy_object): Adjust. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@215736 138bc75d-0d04-0410-961f-82ee72b054a4 --- diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index 00d3fe277f86..2cc37928c399 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,5 +1,9 @@ 2014-09-30 Jason Merrill + * 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. diff --git a/gcc/cp/method.c b/gcc/cp/method.c index d0e010500f83..b427d65d6429 100644 --- a/gcc/cp/method.c +++ b/gcc/cp/method.c @@ -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); } diff --git a/gcc/cp/tree.c b/gcc/cp/tree.c index a7bb38b97c11..2247eb5baa86 100644 --- a/gcc/cp/tree.c +++ b/gcc/cp/tree.c @@ -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); }