A warning patch, ptr assignment cleanup + error w/define after col 0
Zack Weinberg
zack@rabi.columbia.edu
Wed Mar 31 18:59:00 GMT 1999
On Thu, 18 Mar 1999 16:17:27 -0500 (EST), "Kaveh R. Ghazi" wrote:
> This patch gets a few warnings on alpha stage1 cc (and probably
>others) with incompatible ptr assignments. It also fixes an error where
>cc cannot handle a #define which starts after column 0. (That one
>caused a bootstrap failure in stage 1.)
Couple of kibitzes.
>diff -rup orig/egcs-CVS19990317/gcc/cpplib.c egcs-CVS19990317/gcc/cpplib.c
>--- orig/egcs-CVS19990317/gcc/cpplib.c Tue Mar 16 22:13:37 1999
>+++ egcs-CVS19990317/gcc/cpplib.c Thu Mar 18 11:15:53 1999
>@@ -2748,7 +2748,7 @@ do_assert (pfile, keyword)
> cpp_pedwarn (pfile, "ANSI C does not allow `#assert'");
>
> cpp_skip_hspace (pfile);
>- sym = CPP_PWRITTEN (pfile); /* remember where it starts */
>+ sym = (char *) CPP_PWRITTEN (pfile); /* remember where it starts */
Why not change sym to an unsigned char * ?
>@@ -2815,7 +2815,7 @@ do_unassert (pfile, keyword)
>
> cpp_skip_hspace (pfile);
>
>- sym = CPP_PWRITTEN (pfile); /* remember where it starts */
>+ sym = (char *) CPP_PWRITTEN (pfile); /* remember where it starts */
> ret = parse_assertion (pfile);
> if (ret == 0)
> goto error;
Ditto...
zw
More information about the Gcc-patches
mailing list