+2017-02-22 Marek Polacek <polacek@redhat.com>
+
+ PR c/79662
+ * c-typeck.c (convert_arguments): Handle error_mark_node.
+
2017-02-19 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
* gimple-parser.c (c_parser_gimple_postfix_expression): Check return
/* Detect integer changing in width or signedness.
These warnings are only activated with
-Wtraditional-conversion, not with -Wtraditional. */
- else if (warn_traditional_conversion && INTEGRAL_TYPE_P (type)
+ else if (warn_traditional_conversion
+ && INTEGRAL_TYPE_P (type)
&& INTEGRAL_TYPE_P (valtype))
{
tree would_have_been = default_conversion (val);
tree type1 = TREE_TYPE (would_have_been);
- if (TREE_CODE (type) == ENUMERAL_TYPE
- && (TYPE_MAIN_VARIANT (type)
- == TYPE_MAIN_VARIANT (valtype)))
+ if (val == error_mark_node)
+ /* VAL could have been of incomplete type. */;
+ else if (TREE_CODE (type) == ENUMERAL_TYPE
+ && (TYPE_MAIN_VARIANT (type)
+ == TYPE_MAIN_VARIANT (valtype)))
/* No warning if function asks for enum
and the actual arg is that enum type. */
;