This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

PATCH : cpplib.c - cast missing


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;

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]