summaryrefslogtreecommitdiff
path: root/gcc/cppspec.c
diff options
context:
space:
mode:
authorzack <zack@138bc75d-0d04-0410-961f-82ee72b054a4>2000-08-02 20:21:27 +0000
committerzack <zack@138bc75d-0d04-0410-961f-82ee72b054a4>2000-08-02 20:21:27 +0000
commit826f65051b372f39bc2b91ff71c387550d1a9cba (patch)
treefd152d55cc2977cce93eb949677f8ea99866bf67 /gcc/cppspec.c
parent65d0fdfa264aefe3cd73493b55afca39b87811be (diff)
downloadgcc-826f65051b372f39bc2b91ff71c387550d1a9cba.tar.gz
* gcc.h (lang_specific_driver): Constify second argument.
* gcc.c (translate_options, process_command, main): Likewise. Constify variables to match. Cast second argument to pexecute. * cppspec.c, gccspec.c, g++spec.c, g77spec.c, jvspec.c: Adjust type of second argument to lang_specific_driver, and update code as necessary. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@35433 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/cppspec.c')
-rw-r--r--gcc/cppspec.c12
1 files changed, 5 insertions, 7 deletions
diff --git a/gcc/cppspec.c b/gcc/cppspec.c
index 543c4c8c700..3796cdc7f5a 100644
--- a/gcc/cppspec.c
+++ b/gcc/cppspec.c
@@ -72,12 +72,12 @@ static const char *const known_suffixes[] =
void
lang_specific_driver (in_argc, in_argv, in_added_libraries)
int *in_argc;
- char ***in_argv;
+ const char *const **in_argv;
int *in_added_libraries ATTRIBUTE_UNUSED;
{
int argc = *in_argc;
- char **argv = *in_argv;
-
+ const char *const *argv = *in_argv;
+
/* Do we need to read stdin? */
int read_stdin = 1;
@@ -100,7 +100,6 @@ lang_specific_driver (in_argc, in_argv, in_added_libraries)
int need_fixups = 1;
int i, j, quote = 0;
- char **real_new_argv;
const char **new_argv;
int new_argc;
@@ -196,8 +195,7 @@ lang_specific_driver (in_argc, in_argv, in_added_libraries)
return;
/* One more slot for a terminating null. */
- real_new_argv = (char **) xmalloc ((new_argc + 1) * sizeof(char *));
- new_argv = (const char **) real_new_argv;
+ new_argv = (const char **) xmalloc ((new_argc + 1) * sizeof(char *));
new_argv[0] = argv[0];
j = 1;
@@ -225,7 +223,7 @@ lang_specific_driver (in_argc, in_argv, in_added_libraries)
new_argv[j] = NULL;
*in_argc = new_argc;
- *in_argv = real_new_argv;
+ *in_argv = new_argv;
}
/* Called before linking. Returns 0 on success and -1 on failure. */