From: Mark Mitchell Date: Tue, 2 Mar 2004 05:59:29 +0000 (+0000) Subject: re PR bootstrap/14356 (gcc.c:3661: error: assignment of read-only location) X-Git-Tag: releases/gcc-4.0.0~9699 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=e451301f7815dd2a360424cbc197848b41ba84c3;p=thirdparty%2Fgcc.git re PR bootstrap/14356 (gcc.c:3661: error: assignment of read-only location) PR bootstrap/14356 * gcc.c (process_command): Remove const-qualification from argv. (main): Likewise. From-SVN: r78751 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index dfd778ca3ad1..27794764aa61 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2004-03-01 Mark Mitchell + + PR bootstrap/14356 + * gcc.c (process_command): Remove const-qualification from argv. + (main): Likewise. + 2004-03-02 Kazu Hirata * config/h8300/h8300.md (pushqi1_h8300hs): Rename to diff --git a/gcc/gcc.c b/gcc/gcc.c index 78e82c49bd9e..d69da44675d9 100644 --- a/gcc/gcc.c +++ b/gcc/gcc.c @@ -340,7 +340,7 @@ static void display_help (void); static void add_preprocessor_option (const char *, int); static void add_assembler_option (const char *, int); static void add_linker_option (const char *, int); -static void process_command (int, const char *const *); +static void process_command (int, const char **); static int execute (void); static void alloc_args (void); static void clear_args (void); @@ -3076,7 +3076,7 @@ add_linker_option (const char *option, int len) Store its length in `n_switches'. */ static void -process_command (int argc, const char *const *argv) +process_command (int argc, const char **argv) { int i; const char *temp; @@ -3314,10 +3314,10 @@ process_command (int argc, const char *const *argv) } /* Convert new-style -- options to old-style. */ - translate_options (&argc, &argv); + translate_options (&argc, (const char *const **) &argv); /* Do language-specific adjustment/addition of flags. */ - lang_specific_driver (&argc, &argv, &added_libraries); + lang_specific_driver (&argc, (const char *const **) &argv, &added_libraries); /* Scan argv twice. Here, the first time, just count how many switches there will be in their vector, and how many input files in theirs. @@ -5904,10 +5904,10 @@ fatal_error (int signum) kill (getpid (), signum); } -extern int main (int, const char *const *); +extern int main (int, const char **); int -main (int argc, const char *const *argv) +main (int argc, const char **argv) { size_t i; int value;