From e9c15f6eaa2e4e07d27ce12485361d719df16ef5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois-Xavier=20Coudert?= Date: Thu, 13 Sep 2007 10:10:11 +0000 Subject: [PATCH] re PR bootstrap/33309 (gcc.c:6236: error: passing argument 1 of 'xputenv' discards qualifiers from pointer target type) PR driver/33309 * gcc.c (xputenv): Make argument const, and use CONST_CAST. From-SVN: r128457 --- gcc/ChangeLog | 7 ++++++- gcc/gcc.c | 6 +++--- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 2db9c0e54ab..e2032f23d97 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2007-09-13 Francois-Xavier Coudert + + PR driver/33309 + * gcc.c (xputenv): Make argument const, and use CONST_CAST. + 2007-09-12 Michael Meissner Dwarakanath Rajagopal Tony Linthicum @@ -463,7 +468,7 @@ FOREACH_FUNCTION_ARGS to iterate over the argument list. Use prototype_p to determine if a function is prototyped. -2007-09-12 Janis Johnson * config/dfp-bit.c (dfp_conversion_exception): New function. (DFP_TO_DFP) Add new variants to use direct conversions in decNumber. diff --git a/gcc/gcc.c b/gcc/gcc.c index e40156a6417..fbbee556064 100644 --- 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.