+2018-01-01 Jakub Jelinek <jakub@redhat.com>
+
+ PR c/83595
+ * c-parser.c (c_parser_braced_init, c_parser_initelt,
+ c_parser_conditional_expression, c_parser_cast_expression,
+ c_parser_sizeof_expression, c_parser_alignof_expression,
+ c_parser_postfix_expression, c_parser_omp_declare_reduction,
+ c_parser_transaction_expression): Use set_error () method instead
+ of setting value member to error_mark_node.
+
2017-12-28 Michael Meissner <meissner@linux.vnet.ibm.com>
* c-decl.c (header_for_builtin_fn): Add integer rounding _Float<N>
c_token *next_tok = c_parser_peek_token (parser);
if (next_tok->type != CPP_CLOSE_BRACE)
{
- ret.value = error_mark_node;
+ ret.set_error ();
ret.original_code = ERROR_MARK;
ret.original_type = NULL;
braces.skip_until_found_close (parser);
else
{
struct c_expr init;
- init.value = error_mark_node;
+ init.set_error ();
init.original_code = ERROR_MARK;
init.original_type = NULL;
c_parser_error (parser, "expected identifier");
else
{
struct c_expr init;
- init.value = error_mark_node;
+ init.set_error ();
init.original_code = ERROR_MARK;
init.original_type = NULL;
c_parser_error (parser, "expected %<=%>");
if (!c_parser_require (parser, CPP_COLON, "expected %<:%>"))
{
c_inhibit_evaluation_warnings -= cond.value == truthvalue_true_node;
- ret.value = error_mark_node;
+ ret.set_error ();
ret.original_code = ERROR_MARK;
ret.original_type = NULL;
return ret;
parens.skip_until_found_close (parser);
if (type_name == NULL)
{
- ret.value = error_mark_node;
+ ret.set_error ();
ret.original_code = ERROR_MARK;
ret.original_type = NULL;
return ret;
struct c_expr ret;
c_inhibit_evaluation_warnings--;
in_sizeof--;
- ret.value = error_mark_node;
+ ret.set_error ();
ret.original_code = ERROR_MARK;
ret.original_type = NULL;
return ret;
struct c_expr ret;
c_inhibit_evaluation_warnings--;
in_alignof--;
- ret.value = error_mark_node;
+ ret.set_error ();
ret.original_code = ERROR_MARK;
ret.original_type = NULL;
return ret;
&& !targetm.fixed_point_supported_p ())
{
error_at (loc, "fixed-point types not supported for this target");
- expr.value = error_mark_node;
+ expr.set_error ();
}
break;
case CPP_CHAR:
struct c_expr initializer;
tree omp_priv = NULL_TREE, omp_orig = NULL_TREE;
bool bad = false;
- initializer.value = error_mark_node;
+ initializer.set_error ();
if (!c_parser_require (parser, CPP_CLOSE_PAREN, "expected %<)%>"))
bad = true;
else if (c_parser_next_token_is (parser, CPP_NAME)
else
{
error:
- ret.value = error_mark_node;
+ ret.set_error ();
ret.original_code = ERROR_MARK;
ret.original_type = NULL;
}