aboutsummaryrefslogtreecommitdiff
path: root/gcc/gcc.c
diff options
context:
space:
mode:
authorFrançois-Xavier Coudert <fxcoudert@gcc.gnu.org>2007-09-13 10:10:11 +0000
committerFrançois-Xavier Coudert <fxcoudert@gcc.gnu.org>2007-09-13 10:10:11 +0000
commite9c15f6eaa2e4e07d27ce12485361d719df16ef5 (patch)
treed6f706526ba4774b17d84b77741fe988a9c9395c /gcc/gcc.c
parent04e1d06b795dc7dfa11be5e0ee04467a28e105dd (diff)
downloadgcc-e9c15f6eaa2e4e07d27ce12485361d719df16ef5.zip
gcc-e9c15f6eaa2e4e07d27ce12485361d719df16ef5.tar.gz
gcc-e9c15f6eaa2e4e07d27ce12485361d719df16ef5.tar.bz2
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
Diffstat (limited to 'gcc/gcc.c')
-rw-r--r--gcc/gcc.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/gcc/gcc.c b/gcc/gcc.c
index e40156a..fbbee55 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.