Commit b581c05c by Prathamesh Kulkarni Committed by Marek Polacek

c-parser.c (c_parser_get_builtin_args): Replace calls to C_EXPR_APPEND by vec_safe_push.

	* c-parser.c (c_parser_get_builtin_args): Replace calls to
	C_EXPR_APPEND by vec_safe_push.
	* c-tree.h (C_EXPR_APPEND): Remove.

From-SVN: r207614
parent 63fefb4b
2014-02-07 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
* c-parser.c (c_parser_get_builtin_args): Replace calls to
C_EXPR_APPEND by vec_safe_push.
* c-tree.h (C_EXPR_APPEND): Remove.
2014-01-31 Marek Polacek <polacek@redhat.com> 2014-01-31 Marek Polacek <polacek@redhat.com>
PR c/59963 PR c/59963
......
...@@ -6659,12 +6659,12 @@ c_parser_get_builtin_args (c_parser *parser, const char *bname, ...@@ -6659,12 +6659,12 @@ c_parser_get_builtin_args (c_parser *parser, const char *bname,
force_folding_builtin_constant_p force_folding_builtin_constant_p
= saved_force_folding_builtin_constant_p; = saved_force_folding_builtin_constant_p;
vec_alloc (cexpr_list, 1); vec_alloc (cexpr_list, 1);
C_EXPR_APPEND (cexpr_list, expr); vec_safe_push (cexpr_list, expr);
while (c_parser_next_token_is (parser, CPP_COMMA)) while (c_parser_next_token_is (parser, CPP_COMMA))
{ {
c_parser_consume_token (parser); c_parser_consume_token (parser);
expr = c_parser_expr_no_commas (parser, NULL); expr = c_parser_expr_no_commas (parser, NULL);
C_EXPR_APPEND (cexpr_list, expr); vec_safe_push (cexpr_list, expr);
} }
if (!c_parser_require (parser, CPP_CLOSE_PAREN, "expected %<)%>")) if (!c_parser_require (parser, CPP_CLOSE_PAREN, "expected %<)%>"))
......
...@@ -132,15 +132,6 @@ struct c_expr ...@@ -132,15 +132,6 @@ struct c_expr
inside the VEC types. */ inside the VEC types. */
typedef struct c_expr c_expr_t; typedef struct c_expr c_expr_t;
/* A varray of c_expr_t. */
/* Append a new c_expr_t element to V. */
#define C_EXPR_APPEND(V, ELEM) \
do { \
c_expr_t __elem = (ELEM); \
vec_safe_push (V, __elem); \
} while (0)
/* A kind of type specifier. Note that this information is currently /* A kind of type specifier. Note that this information is currently
only used to distinguish tag definitions, tag references and typeof only used to distinguish tag definitions, tag references and typeof
uses. */ uses. */
......
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