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: egcs, PATCH to fix warnings in gperf generated files ...



  In message <199810062038.QAA05097@caip.rutgers.edu>you write:
  > 	Okay, below is a patch to gperf-2.7 to generate warning-happy
  > output.
  > 
  > 	In the upgrade from 2.5 to 2.7, we get the "(unsigned char)"
  > casts inside array indexes for free. :-)
  > 
  > 	As for the missing initializers, there didn't seem to be an
  > easy way to figure out how many initializers there should be or what
  > they should look like.  Gperf seems to just store all the stuff after
  > the token in a char* "rest" variable, so its not already parsed
  > telling me how many args and what they are.  Also if there were nested
  > structures, it'd get even more complicated.  I decided that instead of
  > making gperf figure out what the missing inits should be, I added a
  > flag (-F arg) so we could pass in the right value.
  > 
  > 	I tested this and gperf still passes its own "make check" and
  > the warnings are in fact eliminated in the output files.
  > 
  > 	If this looks okay, I'd like to put this patch in the
  > infrastructure directory as gperf-2.7-19981006.pat and regen all the
  > gperf files using it.  (Should I avoid regenerating in the java dir?)
  > 
  > 	Oh yeah, the Makefiles will need a patch to use the -F flag
  > and also to use "-L KR-C" since the default is no longer K&R.
  > 
  > 	Comments?  (Other than esthetics like pick a different flag name) :-)
  > If all's well then let me know and I'll proceed.
Looks pretty reasonable to me.  Then again, I'm not a C++ guy :-)

We could/should also check the patch into the contrib tree.

Yes, go ahead and update the gperf files in the distribution.  Go ahead
and regen java's too -- it doesn't require you to actually look at or modify
source code, so it should be safe (I'm also told the legal crud is just about
ready for java).

jeff


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