Commit 76b67a0a by Paolo Carlini Committed by Paolo Carlini

re PR c++/58560 ([c++11] ICE with auto in typedef)

/cp
2013-10-04  Paolo Carlini  <paolo.carlini@oracle.com>

	PR c++/58560
	* typeck2.c (build_functional_cast): Use error_operand_p on exp.

/testsuite
2013-10-04  Paolo Carlini  <paolo.carlini@oracle.com>

	PR c++/58560
	* g++.dg/cpp0x/auto39.C: New.

From-SVN: r203220
parent 12f64ca5
2013-10-04 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/58560
* typeck2.c (build_functional_cast): Use error_operand_p on exp.
2013-10-04 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/58503
* parser.c (cp_parser_perform_range_for_lookup): If eventually
either *begin or *end is type-dependent, return NULL_TREE.
......
......@@ -1757,7 +1757,7 @@ build_functional_cast (tree exp, tree parms, tsubst_flags_t complain)
tree type;
vec<tree, va_gc> *parmvec;
if (exp == error_mark_node || parms == error_mark_node)
if (error_operand_p (exp) || parms == error_mark_node)
return error_mark_node;
if (TREE_CODE (exp) == TYPE_DECL)
......
2013-10-04 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/58560
* g++.dg/cpp0x/auto39.C: New.
2013-10-04 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/58503
* g++.dg/cpp0x/range-for26.C: New.
* g++.dg/cpp0x/range-for27.C: Likewise.
......
// PR c++/58560
// { dg-do compile { target c++11 } }
typedef auto T; // { dg-error "typedef declared 'auto'" }
void foo() { T(); }
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