re PR bootstrap/33309 (gcc.c:6236: error: passing argument 1 of 'xputenv' discards...
authorFrançois-Xavier Coudert <fxcoudert@gcc.gnu.org>
Thu, 13 Sep 2007 10:10:11 +0000 (10:10 +0000)
committerFrançois-Xavier Coudert <fxcoudert@gcc.gnu.org>
Thu, 13 Sep 2007 10:10:11 +0000 (10:10 +0000)
PR driver/33309
* gcc.c (xputenv): Make argument const, and use CONST_CAST.

From-SVN: r128457

gcc/ChangeLog
gcc/gcc.c

index 2db9c0e54ab246ad5eb36092c6f4874b94eb0293..e2032f23d9712c9b2e0a1261a526cffcbe0e973b 100644 (file)
@@ -1,3 +1,8 @@
+2007-09-13  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
+
+       PR driver/33309
+       * gcc.c (xputenv): Make argument const, and use CONST_CAST.
+
 2007-09-12  Michael Meissner  <michael.meissner@amd.com>
            Dwarakanath Rajagopal  <dwarak.rajagopal@amd.com>
            Tony Linthicum  <tony.linthicum@amd.com>
        FOREACH_FUNCTION_ARGS to iterate over the argument list.  Use
        prototype_p to determine if a function is prototyped.
 
-2007-09-12  Janis Johnson  <janis187@us.ibm.com
+2007-09-12  Janis Johnson  <janis187@us.ibm.com>
 
        * config/dfp-bit.c (dfp_conversion_exception): New function.
        (DFP_TO_DFP) Add new variants to use direct conversions in decNumber.
index e40156a64171314f987520c494e1852f2d902a36..fbbee556064621e5d376cd2ebdbc410c1b0f556d 100644 (file)
--- a/gcc/gcc.c
+++ b/gcc/gcc.c
@@ -297,7 +297,7 @@ static void set_spec (const char *, const char *);
 static struct compiler *lookup_compiler (const char *, size_t, const char *);
 static char *build_search_list (const struct path_prefix *, const char *,
                                bool, bool);
-static void xputenv (char *);
+static void xputenv (const char *);
 static void putenv_from_prefixes (const struct path_prefix *, const char *,
                                  bool);
 static int access_check (const char *, int);
@@ -2603,11 +2603,11 @@ add_to_obstack (char *path, void *data)
 /* Add or change the value of an environment variable, outputting the
    change to standard error if in verbose mode.  */
 static void
-xputenv (char *string)
+xputenv (const char *string)
 {
   if (verbose_flag)
     notice ("%s\n", string);
-  putenv (string);
+  putenv (CONST_CAST (char *, string));
 }
 
 /* Build a list of search directories from PATHS.