This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] argv needs to be writable
- To: obrien at NUXI dot com
- Subject: Re: [PATCH] argv needs to be writable
- From: Jeffrey A Law <law at cygnus dot com>
- Date: Wed, 14 Jun 2000 09:53:29 -0600
- cc: gcc-patches at gcc dot gnu dot org
- Reply-To: law at cygnus dot com
In message <20000613124311.A89856@dragon.nuxi.com>you write:
> gccspec.c(lang_specific_driver) and cppspec.c(lang_specific_driver) both
> assume that argv is writable. Thus one gets:
>
> ../../egcs/gcc/gcc.c:3085: warning: passing arg 2 of `lang_specific_dri
> ver' from incompatible pointer type
>
> when compiling the `gcc' binary.
>
> --
> -- David (obrien@NUXI.com)
>
>
>
> 2000-06-13 David O'Brien <obrien@FreeBSD.org>
>
> * gcc.h (main): Quiet compiler warnings. argv is assumed to be
> writable in parts of the GCC code.
Actually, I would prefer you to find out if any of the lang_specific_driver
routines actually modify argv (if you already did, then just tell me which
one). If none of them modify argv, then we can probably make the argument
to lang_specific_driver a const.
If removing the const is the right thing to do, then you need to update both
gcc.c and gcc.h (your patch changed gcc.c, your ChangeLog referenced gcc.h).
jeff