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]

Re: A warning patch, ptr assignment cleanup + error w/define after col 0


 > From: Zack Weinberg <zack@rabi.columbia.edu>
 >  
 > 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

	As far as I could tell, it would have required a similar number
of casts in the other direction.  (I could be wrong though.)

		--Kaveh
--
Kaveh R. Ghazi			Engagement Manager / Project Services
ghazi@caip.rutgers.edu		Qwest Internet Solutions


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