From: Kelley Cook Date: Thu, 25 Mar 2004 00:58:37 +0000 (+0000) Subject: backport: re PR bootstrap/14356 (gcc.c:3661: error: assignment of read-only location) X-Git-Tag: releases/gcc-3.3.4~131 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=60d4fd71443a8df55cfe2f750050d391a404261b;p=thirdparty%2Fgcc.git backport: re PR bootstrap/14356 (gcc.c:3661: error: assignment of read-only location) 2004-03-24 Kelley Cook Backport: 2004-03-01 Mark Mitchell PR bootstrap/14356 * gcc.c (process_command): Remove const-qualification from argv. (main): Likewise. From-SVN: r79944 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index d7ac71ab1804..7ad06262a071 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,12 @@ +2004-03-24 Kelley Cook + + Backport: + 2004-03-01 Mark Mitchell + + PR bootstrap/14356 + * gcc.c (process_command): Remove const-qualification from argv. + (main): Likewise. + 2004-03-24 Alexandre Oliva PR preprocessor/14438 diff --git a/gcc/gcc.c b/gcc/gcc.c index 86fb2eb4ed55..1de6e4264ff0 100644 --- a/gcc/gcc.c +++ b/gcc/gcc.c @@ -328,7 +328,7 @@ static void display_help PARAMS ((void)); static void add_preprocessor_option PARAMS ((const char *, int)); static void add_assembler_option PARAMS ((const char *, int)); static void add_linker_option PARAMS ((const char *, int)); -static void process_command PARAMS ((int, const char *const *)); +static void process_command PARAMS ((int, const char **)); static int execute PARAMS ((void)); static void alloc_args PARAMS ((void)); static void clear_args PARAMS ((void)); @@ -3050,7 +3050,7 @@ add_linker_option (option, len) static void process_command (argc, argv) int argc; - const char *const *argv; + const char **argv; { int i; const char *temp; @@ -3279,10 +3279,10 @@ process_command (argc, 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. @@ -5917,12 +5917,12 @@ fatal_error (signum) kill (getpid (), signum); } -extern int main PARAMS ((int, const char *const *)); +extern int main PARAMS ((int, const char **)); int main (argc, argv) int argc; - const char *const *argv; + const char **argv; { size_t i; int value;