Commit 2bd8ca21 by Jason Merrill Committed by Jason Merrill

re PR c++/63362 (The c++11 triviality-traits need front-end help)

	PR c++/63362
	* tree.c (strip_typedefs): Handle TREE_LIST.

From-SVN: r215860
parent 22806403
2014-10-03 Jason Merrill <jason@redhat.com>
PR c++/63362
* tree.c (strip_typedefs): Handle TREE_LIST.
2014-10-03 Paolo Carlini <paolo.carlini@oracle.com>
* parser.c (cp_parser_assignment_expression,
......
......@@ -1201,11 +1201,33 @@ strip_typedefs (tree t)
{
tree result = NULL, type = NULL, t0 = NULL;
if (!t || t == error_mark_node || t == TYPE_CANONICAL (t))
if (!t || t == error_mark_node)
return t;
if (TREE_CODE (t) == TREE_LIST)
{
bool changed = false;
vec<tree,va_gc> *vec = make_tree_vector ();
for (; t; t = TREE_CHAIN (t))
{
gcc_assert (!TREE_PURPOSE (t));
tree elt = strip_typedefs (TREE_VALUE (t));
if (elt != TREE_VALUE (t))
changed = true;
vec_safe_push (vec, elt);
}
tree r = t;
if (changed)
r = build_tree_list_vec (vec);
release_tree_vector (vec);
return r;
}
gcc_assert (TYPE_P (t));
if (t == TYPE_CANONICAL (t))
return t;
switch (TREE_CODE (t))
{
case POINTER_TYPE:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment