aboutsummaryrefslogtreecommitdiff
path: root/gcc/opts.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/opts.c')
-rw-r--r--gcc/opts.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/gcc/opts.c b/gcc/opts.c
index 34c5698..26a0bb8 100644
--- a/gcc/opts.c
+++ b/gcc/opts.c
@@ -190,8 +190,6 @@ base_of_path (const char *path, const char **base_out)
static const char undocumented_msg[] = N_("This switch lacks documentation");
typedef char *char_p; /* For DEF_VEC_P. */
-DEF_VEC_P(char_p);
-DEF_VEC_ALLOC_P(char_p,heap);
static void handle_param (struct gcc_options *opts,
struct gcc_options *opts_set, location_t loc,
@@ -239,7 +237,9 @@ add_comma_separated_to_vector (void **pvec, const char *arg)
char *r;
char *w;
char *token_start;
- VEC(char_p,heap) *vec = (VEC(char_p,heap) *) *pvec;
+ vec<char_p> *v = (vec<char_p> *) *pvec;
+
+ vec_check_alloc (v, 1);
/* We never free this string. */
tmp = xstrdup (arg);
@@ -254,7 +254,7 @@ add_comma_separated_to_vector (void **pvec, const char *arg)
{
*w++ = '\0';
++r;
- VEC_safe_push (char_p, heap, vec, token_start);
+ v->safe_push (token_start);
token_start = w;
}
if (*r == '\\' && r[1] == ',')
@@ -266,9 +266,9 @@ add_comma_separated_to_vector (void **pvec, const char *arg)
*w++ = *r++;
}
if (*token_start != '\0')
- VEC_safe_push (char_p, heap, vec, token_start);
+ v->safe_push (token_start);
- *pvec = vec;
+ *pvec = v;
}
/* Initialize OPTS and OPTS_SET before using them in parsing options. */