This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: refine cast in collect2 for AIX, fixing bootstrap
- From: Richard Guenther <richard dot guenther at gmail dot com>
- To: Olivier Hainque <hainque at adacore dot com>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Mon, 2 Jan 2012 13:45:50 +0100
- Subject: Re: refine cast in collect2 for AIX, fixing bootstrap
- References: <E351471F-0C96-491C-9B56-4DC3E33FF5A5@adacore.com>
On Fri, Dec 23, 2011 at 6:29 PM, Olivier Hainque <hainque@adacore.com> wrote:
> Hello,
>
> Past http://gcc.gnu.org/ml/gcc-patches/2011-12/msg01691.html,
> bootstrap still fails on AIX, from
>
> ?gcc/collect2.c:1484:25: error: to be safe all intermediate pointers in cast from
> ?'char **' to 'const char **' must be 'const' qualified [-Werror=cast-qual]
> ?gcc/collect2.c:1488:15: <same>
>
> This patch fixes this by using CONST_CAST2, as seems appropriate for the
> case at hand.
>
> Tested by checking that bootstrap proceeds and terminates after the
> change on powerpc-ibm-aix5.3
>
> OK ?
Ok.
Thanks,
Richard.
> Thanks in advance,
>
> Regards,
>
> Olivier
>
> --
>
> 2011-12-23 ?Olivier Hainque ?<hainque@adacore.com>
>
> ? ? ? ?* collect2.c (main): In AIX specific computations for vector insertions,
> ? ? ? ?use CONST_CAST2 to cast from char ** to const char **.
>