This is the mail archive of the mailing list for the GCC project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug bootstrap/33309] gcc.c:6236: error: passing argument 1 of 'xputenv' discards qualifiers from pointer target type

------- Comment #7 from andreast at gcc dot gnu dot org  2007-09-10 20:42 -------
What is the status here?
I tested the patch below on hppa64-hp-hpux11.11, i686-pc-linux-gnu and
i686-apple-darwin8. It brings the pa target past the failure. The others
completed bootstrap. I'm not able to test on the other targets I have access to
since they are blocked by 32283.

Index: gcc.c
--- gcc.c       (revision 128287)
+++ gcc.c       (working copy)
@@ -297,7 +297,7 @@
 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 *,
 static int access_check (const char *, int);
@@ -2602,11 +2602,11 @@
 /* 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.


andreast at gcc dot gnu dot org changed:

           What    |Removed                     |Added
                 CC|                            |andreast at gcc dot gnu dot
                   |                            |org
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|0                           |1
   Last reconfirmed|0000-00-00 00:00:00         |2007-09-10 20:42:01
               date|                            |

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]