This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[PATCH] argv needs to be writable
- To: gcc-patches at gcc dot gnu dot org
- Subject: [PATCH] argv needs to be writable
- From: "David O'Brien" <obrien at NUXI dot com>
- Date: Tue, 13 Jun 2000 12:43:11 -0700
- Organization: The NUXI BSD group
- Reply-To: obrien at NUXI dot com
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_driver' 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.
Index: gcc.c
===================================================================
RCS file: /cvs/gcc/egcs/gcc/gcc.c,v
retrieving revision 1.145
diff -u -r1.145 gcc.c
--- gcc.c 2000/05/23 17:42:18 1.145
+++ gcc.c 2000/06/13 19:39:02
@@ -5135,7 +5135,7 @@
int
main (argc, argv)
int argc;
- const char **argv;
+ char **argv;
{
register size_t i;
size_t j;