+2016-09-04 Tom de Vries <tom@codesourcery.com>
+
+ revert:
+ 2016-08-29 Tom de Vries <tom@codesourcery.com>
+
+ * c-common.c (build_va_arg): Replace first argument type error
+ with assert.
+
2016-09-02 Jakub Jelinek <jakub@redhat.com>
PR c/65467
/* Verify that &ap is still recognized as having va_list type. */
tree canon_expr_type
= targetm.canonical_va_list_type (TREE_TYPE (expr));
- gcc_assert (canon_expr_type != NULL_TREE);
+ if (canon_expr_type == NULL_TREE)
+ {
+ error_at (loc,
+ "first argument to %<va_arg%> not of type %<va_list%>");
+ return error_mark_node;
+ }
return build_va_arg_1 (loc, type, expr);
}
/* Verify that &ap is still recognized as having va_list type. */
tree canon_expr_type
= targetm.canonical_va_list_type (TREE_TYPE (expr));
- gcc_assert (canon_expr_type != NULL_TREE);
+ if (canon_expr_type == NULL_TREE)
+ {
+ error_at (loc,
+ "first argument to %<va_arg%> not of type %<va_list%>");
+ return error_mark_node;
+ }
}
else
{