This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
PATCH : cpplib.c - cast missing
- To: gcc-patches at gcc dot gnu dot org (gcc-patches at gcc dot gnu dot org)
- Subject: PATCH : cpplib.c - cast missing
- From: "Philippe De Muyter" <phdm at macqel dot be>
- Date: Wed, 5 Apr 2000 06:55:21 +0200 (CEST)
My K&R compiler complains about `illegal pointer combination'. Here is a fix :
Philippe De Muyter <phdm@macqel.be>
* cpplib.c (do_ifndef): Cast `xstrdup' return value.
Index: gcc/cpplib.c
===================================================================
RCS file: /cvs/gcc/egcs/gcc/cpplib.c,v
retrieving revision 1.139
diff -u -p -r1.139 cpplib.c
--- cpplib.c 2000/04/04 21:07:17 1.139
+++ cpplib.c 2000/04/05 04:35:22
@@ -1309,7 +1309,7 @@ do_ifndef (pfile)
skip = parse_ifdef (pfile, dtable[T_IFNDEF].name);
if (start_of_file && !skip)
- control_macro = xstrdup (CPP_PWRITTEN (pfile));
+ control_macro = (U_CHAR *) xstrdup (CPP_PWRITTEN (pfile));
conditional_skip (pfile, skip, T_IFNDEF, control_macro);
return 0;