summaryrefslogtreecommitdiff
path: root/gcc/cp/tree.c
diff options
context:
space:
mode:
authorbstarynk <bstarynk@138bc75d-0d04-0410-961f-82ee72b054a4>2016-04-16 17:02:56 +0000
committerbstarynk <bstarynk@138bc75d-0d04-0410-961f-82ee72b054a4>2016-04-16 17:02:56 +0000
commitc8aed844acdc89884d630c7e3266ecd8d4101847 (patch)
tree0d046a9255339220c1bbd6ba14e84e5304acbe10 /gcc/cp/tree.c
parent74f8420a5b204c5e021ce05b3d0d79ba9718360a (diff)
downloadgcc-c8aed844acdc89884d630c7e3266ecd8d4101847.tar.gz
2016-04-16 Basile Starynkevitch <basile@starynkevitch.net>
{{merging with even more of GCC 6, using subversion 1.9 svn merge -r231651:232605 ^/trunk }} [gcc/] 2016-04-16 Basile Starynkevitch <basile@starynkevitch.net> * melt/libmelt-ana-gimple.melt: (melt_build_transaction_with_label_norm): New inlined function, for gimple_transaction operator implementation... git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/melt-branch@235064 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/cp/tree.c')
-rw-r--r--gcc/cp/tree.c35
1 files changed, 16 insertions, 19 deletions
diff --git a/gcc/cp/tree.c b/gcc/cp/tree.c
index 0c0987df0f6..e2123ac5179 100644
--- a/gcc/cp/tree.c
+++ b/gcc/cp/tree.c
@@ -1,5 +1,5 @@
/* Language-dependent node constructors for parse phase of GNU compiler.
- Copyright (C) 1987-2015 Free Software Foundation, Inc.
+ Copyright (C) 1987-2016 Free Software Foundation, Inc.
Hacked by Michael Tiemann (tiemann@cygnus.com)
This file is part of GCC.
@@ -185,6 +185,12 @@ lvalue_kind (const_tree ref)
op2_lvalue_kind = lvalue_kind (TREE_OPERAND (ref, 2));
break;
+ case MODOP_EXPR:
+ /* We expect to see unlowered MODOP_EXPRs only during
+ template processing. */
+ gcc_assert (processing_template_decl);
+ return clk_ordinary;
+
case MODIFY_EXPR:
case TYPEID_EXPR:
return clk_ordinary;
@@ -1006,7 +1012,7 @@ c_build_qualified_type (tree type, int type_quals, tree /* orig_qual_type */,
arrays correctly. In particular, if TYPE is an array of T's, and
TYPE_QUALS is non-empty, returns an array of qualified T's.
- FLAGS determines how to deal with ill-formed qualifications. If
+ COMPLAIN determines how to deal with ill-formed qualifications. If
tf_ignore_bad_quals is set, then bad qualifications are dropped
(this is permitted if TYPE was introduced via a typedef or template
type parameter). If bad qualifications are dropped and tf_warning
@@ -2741,7 +2747,6 @@ build_min_non_dep_call_vec (tree non_dep, tree fn, vec<tree, va_gc> *argvec)
non_dep = TREE_OPERAND (non_dep, 0);
TREE_TYPE (t) = TREE_TYPE (non_dep);
TREE_SIDE_EFFECTS (t) = TREE_SIDE_EFFECTS (non_dep);
- KOENIG_LOOKUP_P (t) = KOENIG_LOOKUP_P (non_dep);
return convert_from_reference (t);
}
@@ -2804,6 +2809,11 @@ build_min_non_dep_op_overload (enum tree_code op,
call = build_min_non_dep_call_vec (non_dep, fn, args);
release_tree_vector (args);
+ tree call_expr = call;
+ if (REFERENCE_REF_P (call_expr))
+ call_expr = TREE_OPERAND (call_expr, 0);
+ KOENIG_LOOKUP_P (call_expr) = KOENIG_LOOKUP_P (non_dep);
+
return call;
}
@@ -4427,23 +4437,10 @@ cp_tree_operand_length (const_tree t)
{
enum tree_code code = TREE_CODE (t);
- switch (code)
- {
- case PREINCREMENT_EXPR:
- case PREDECREMENT_EXPR:
- case POSTINCREMENT_EXPR:
- case POSTDECREMENT_EXPR:
- return 1;
+ if (TREE_CODE_CLASS (code) == tcc_vl_exp)
+ return VL_EXP_OPERAND_LENGTH (t);
- case ARRAY_REF:
- return 2;
-
- case EXPR_PACK_EXPANSION:
- return 1;
-
- default:
- return TREE_OPERAND_LENGTH (t);
- }
+ return cp_tree_code_length (code);
}
/* Like cp_tree_operand_length, but takes a tree_code CODE. */