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
This commit is contained in:
François-Xavier Coudert 2007-09-13 10:10:11 +00:00
parent 04e1d06b79
commit e9c15f6eaa
2 changed files with 9 additions and 4 deletions

View 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>
@ -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 <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.

View File

@ -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.