diff options
author | Gabriel Dos Reis <gdr@integrable-solutions.net> | 2005-06-06 21:14:31 +0000 |
---|---|---|
committer | Gabriel Dos Reis <gdr@gcc.gnu.org> | 2005-06-06 21:14:31 +0000 |
commit | 7973fd2aeddbdd9fc4595ef2d34fa57d1c3c75cb (patch) | |
tree | de88f6962c15670e120cf115d8582da8df7bd7b9 /gcc/gcc.c | |
parent | 4b794eaf73ef8df7689d1e9de146e00398f2d1fd (diff) | |
download | gcc-7973fd2aeddbdd9fc4595ef2d34fa57d1c3c75cb.tar.gz |
libiberty.h (XOBFINISH): New.
libiberty/
2005-06-06 Gabriel Dos Reis <gdr@integrable-solutions.net>
* libiberty.h (XOBFINISH): New.
gcc/
2005-06-06 Gabriel Dos Reis <gdr@integrable-solutions.net>
* c-lex.c (lex_string): Use XOBFINISH.
* collect2.c (extract_string, dump_file): Likewise.
* dbxout.c (dbxout_finish_complex_stabs): Likewise.
* gcc.c (init_spec, build_search_list, convert_filename,
set_collect_gcc_options, do_spec_2, do_spec_1, main):
* Likewise.
* genpreds.c (write_predicate_subfunction): Likewise.
* genflags.c (main): Likewise.
* read-rtl.c (mode_attr_index, apply_macro_to_string,
join_c_conditions, read_quoted_string, read_braced_string,
read_rtx_1): Likewise.
* stringpool.c (ggc_alloc_string): Likewise.
* tlink.c (obstack_fgets, recompile_files): Likewise.
From-SVN: r100678
Diffstat (limited to 'gcc/gcc.c')
-rw-r--r-- | gcc/gcc.c | 42 |
1 files changed, 21 insertions, 21 deletions
diff --git a/gcc/gcc.c b/gcc/gcc.c index 9be4a293371..076d224bebd 100644 --- a/gcc/gcc.c +++ b/gcc/gcc.c @@ -1736,7 +1736,7 @@ init_spec (void) } obstack_1grow (&obstack, '\0'); - libgcc_spec = obstack_finish (&obstack); + libgcc_spec = XOBFINISH (&obstack, const char *); } #endif #ifdef USE_AS_TRADITIONAL_FORMAT @@ -1745,14 +1745,14 @@ init_spec (void) static const char tf[] = "--traditional-format "; obstack_grow (&obstack, tf, sizeof(tf) - 1); obstack_grow0 (&obstack, asm_spec, strlen (asm_spec)); - asm_spec = obstack_finish (&obstack); + asm_spec = XOBFINISH (&obstack, const char *); } #endif #ifdef LINK_EH_SPEC /* Prepend LINK_EH_SPEC to whatever link_spec we had before. */ obstack_grow (&obstack, LINK_EH_SPEC, sizeof(LINK_EH_SPEC) - 1); obstack_grow0 (&obstack, link_spec, strlen (link_spec)); - link_spec = obstack_finish (&obstack); + link_spec = XOBFINISH (&obstack, const char *); #endif specs = sl; @@ -2393,7 +2393,7 @@ build_search_list (struct path_prefix *paths, const char *prefix, } obstack_1grow (&collect_obstack, '\0'); - return obstack_finish (&collect_obstack); + return XOBFINISH (&collect_obstack, char *); } /* Rebuild the COMPILER_PATH and LIBRARY_PATH environment variables @@ -2980,7 +2980,7 @@ convert_filename (const char *name, int do_exe ATTRIBUTE_UNUSED, { obstack_grow (&obstack, name, len - 2); obstack_grow0 (&obstack, TARGET_OBJECT_SUFFIX, strlen (TARGET_OBJECT_SUFFIX)); - name = obstack_finish (&obstack); + name = XOBFINISH (&obstack, const char *); } #endif @@ -3001,7 +3001,7 @@ convert_filename (const char *name, int do_exe ATTRIBUTE_UNUSED, obstack_grow (&obstack, name, len); obstack_grow0 (&obstack, TARGET_EXECUTABLE_SUFFIX, strlen (TARGET_EXECUTABLE_SUFFIX)); - name = obstack_finish (&obstack); + name = XOBFINISH (&obstack, const char *); #endif return name; @@ -4154,7 +4154,7 @@ set_collect_gcc_options (void) } } obstack_grow (&collect_obstack, "\0", 1); - putenv (obstack_finish (&collect_obstack)); + putenv (XOBFINISH (&collect_obstack, char *)); } /* Process a spec string, accumulating and running commands. */ @@ -4253,7 +4253,7 @@ do_spec_2 (const char *spec) if (arg_going) { obstack_1grow (&obstack, 0); - string = obstack_finish (&obstack); + string = XOBFINISH (&obstack, const char *); if (this_is_library_file) string = find_file (string); store_arg (string, delete_this_arg, this_is_output_file); @@ -4488,7 +4488,7 @@ do_spec_1 (const char *spec, int inswitch, const char *soft_matched_part) if (arg_going) { obstack_1grow (&obstack, 0); - string = obstack_finish (&obstack); + string = XOBFINISH (&obstack, const char *); if (this_is_library_file) string = find_file (string); store_arg (string, delete_this_arg, this_is_output_file); @@ -4533,7 +4533,7 @@ do_spec_1 (const char *spec, int inswitch, const char *soft_matched_part) if (arg_going) { obstack_1grow (&obstack, 0); - string = obstack_finish (&obstack); + string = XOBFINISH (&obstack, const char *); if (this_is_library_file) string = find_file (string); store_arg (string, delete_this_arg, this_is_output_file); @@ -4552,7 +4552,7 @@ do_spec_1 (const char *spec, int inswitch, const char *soft_matched_part) if (arg_going) { obstack_1grow (&obstack, 0); - string = obstack_finish (&obstack); + string = XOBFINISH (&obstack, const char *); if (this_is_library_file) string = find_file (string); store_arg (string, delete_this_arg, this_is_output_file); @@ -4914,7 +4914,7 @@ do_spec_1 (const char *spec, int inswitch, const char *soft_matched_part) if (arg_going) { obstack_1grow (&obstack, 0); - string = obstack_finish (&obstack); + string = XOBFINISH (&obstack, const char *); if (this_is_library_file) string = find_file (string); store_arg (string, delete_this_arg, this_is_output_file); @@ -5243,7 +5243,7 @@ do_spec_1 (const char *spec, int inswitch, const char *soft_matched_part) if (processing_spec_function && arg_going) { obstack_1grow (&obstack, 0); - string = obstack_finish (&obstack); + string = XOBFINISH (&obstack, const char *); if (this_is_library_file) string = find_file (string); store_arg (string, delete_this_arg, this_is_output_file); @@ -6037,21 +6037,21 @@ main (int argc, const char **argv) obstack_grow (&multilib_obstack, p, strlen (p)); obstack_1grow (&multilib_obstack, 0); - multilib_select = obstack_finish (&multilib_obstack); + multilib_select = XOBFINISH (&multilib_obstack, const char *); q = multilib_matches_raw; while ((p = *q++) != (char *) 0) obstack_grow (&multilib_obstack, p, strlen (p)); obstack_1grow (&multilib_obstack, 0); - multilib_matches = obstack_finish (&multilib_obstack); + multilib_matches = XOBFINISH (&multilib_obstack, const char *); q = multilib_exclusions_raw; while ((p = *q++) != (char *) 0) obstack_grow (&multilib_obstack, p, strlen (p)); obstack_1grow (&multilib_obstack, 0); - multilib_exclusions = obstack_finish (&multilib_obstack); + multilib_exclusions = XOBFINISH (&multilib_obstack, const char *); need_space = FALSE; for (i = 0; i < ARRAY_SIZE (multilib_defaults_raw); i++) @@ -6065,7 +6065,7 @@ main (int argc, const char **argv) } obstack_1grow (&multilib_obstack, 0); - multilib_defaults = obstack_finish (&multilib_obstack); + multilib_defaults = XOBFINISH (&multilib_obstack, const char *); } /* Set up to remember the pathname of gcc and any options @@ -6074,7 +6074,7 @@ main (int argc, const char **argv) obstack_init (&collect_obstack); obstack_grow (&collect_obstack, "COLLECT_GCC=", sizeof ("COLLECT_GCC=") - 1); obstack_grow (&collect_obstack, argv[0], strlen (argv[0]) + 1); - putenv (obstack_finish (&collect_obstack)); + putenv (XOBFINISH (&collect_obstack, char *)); #ifdef INIT_ENVIRONMENT /* Set up any other necessary machine specific environment variables. */ @@ -6160,7 +6160,7 @@ main (int argc, const char **argv) { obstack_grow (&obstack, "%(sysroot_spec) ", strlen ("%(sysroot_spec) ")); obstack_grow0 (&obstack, link_spec, strlen (link_spec)); - set_spec ("link", obstack_finish (&obstack)); + set_spec ("link", XOBFINISH (&obstack, const char *)); } #endif @@ -6349,7 +6349,7 @@ main (int argc, const char **argv) obstack_init (&obstack); do_spec_1 (THREAD_MODEL_SPEC, 0, thread_model); obstack_1grow (&obstack, '\0'); - thrmod = obstack_finish (&obstack); + thrmod = XOBFINISH (&obstack, const char *); #else thrmod = thread_model; #endif @@ -7077,7 +7077,7 @@ set_multilib_dir (void) obstack_grow (&multilib_obstack, start, end - start); obstack_1grow (&multilib_obstack, 0); - mdswitches[i].str = obstack_finish (&multilib_obstack); + mdswitches[i].str = XOBFINISH (&multilib_obstack, const char *); mdswitches[i++].len = end - start; if (*end == '\0') |