Commit f764304c by Richard Biener Committed by Richard Biener

typeck.c (enum_cast_to_int): Use CONVERT_EXPR_P to check for conversions.

2014-09-29  Richard Biener  <rguenther@suse.de>

	cp/
	* typeck.c (enum_cast_to_int): Use CONVERT_EXPR_P to check
	for conversions.

From-SVN: r215681
parent f1d6f494
2014-09-29 Richard Biener <rguenther@suse.de>
* typeck.c (enum_cast_to_int): Use CONVERT_EXPR_P to check
for conversions.
2014-09-26 Jason Merrill <jason@redhat.com>
* mangle.c (find_substitution): Use write_abi_tags.
......
......@@ -3835,7 +3835,7 @@ build_x_array_ref (location_t loc, tree arg1, tree arg2,
static bool
enum_cast_to_int (tree op)
{
if (TREE_CODE (op) == NOP_EXPR
if (CONVERT_EXPR_P (op)
&& TREE_TYPE (op) == integer_type_node
&& TREE_CODE (TREE_TYPE (TREE_OPERAND (op, 0))) == ENUMERAL_TYPE
&& TYPE_UNSIGNED (TREE_TYPE (TREE_OPERAND (op, 0))))
......
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