Commit 0c32fb95 by Jason Merrill Committed by Jason Merrill

typeck.c (decay_conversion): Any expression with type nullptr_t decays to nullptr.

	* typeck.c (decay_conversion): Any expression with type nullptr_t
	decays to nullptr.

From-SVN: r162952
parent 00e9a944
2010-08-06 Jason Merrill <jason@redhat.com>
* typeck.c (decay_conversion): Any expression with type nullptr_t
decays to nullptr.
2010-07-30 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
PR c++/45112
......
......@@ -1920,6 +1920,9 @@ decay_conversion (tree exp)
if (error_operand_p (exp))
return error_mark_node;
if (NULLPTR_TYPE_P (type))
return nullptr_node;
/* build_c_cast puts on a NOP_EXPR to make the result not an lvalue.
Leave such NOP_EXPRs, since RHS is being used in non-lvalue context. */
code = TREE_CODE (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