This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug bootstrap/33309] gcc.c:6236: error: passing argument 1 of 'xputenv' discards qualifiers from pointer target type
- From: "dave at hiauly1 dot hia dot nrc dot ca" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 7 Sep 2007 01:50:33 -0000
- Subject: [Bug bootstrap/33309] gcc.c:6236: error: passing argument 1 of 'xputenv' discards qualifiers from pointer target type
- References: <bug-33309-276@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #6 from dave at hiauly1 dot hia dot nrc dot ca 2007-09-07 01:50 -------
Subject: Re: gcc.c:6236: error: passing argument 1 of 'xputenv' discards
qualifiers from pointer target type
> > > Another option would be to constify xputenv and use CONST_CAST on the argument
> > > passed to putenv.
> > Like this?
> > + putenv (CONST_CAST (string));
>
> Almost, CONST_CAST takes a type argument now:
>
> CONST_CAST (char *, string)
The change with the above mod works for me on hpux.
Dave
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33309