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-19980531, warning patches [part 1/2]


  In message <199806040019.UAA09655@caip.rutgers.edu>you write:
  > 	Here is another round of warning fixes.  This is part 1/2.
  > 
  > Please pay special attention to the libgcc2.c change where I replaced
  > malloc/bzero with calloc.  The replacement eliminates a warning about
  > bzero not being prototyped (and is more optimal on linux??)
Let's hold off on this for now.  I think it's the wrong direction,
but won't reject it since several folks think its reasonable.

  > The second issue is that the original bzero didn't multiply the number
  > of elements by sizeof(element) when passing its second argument.  So
  > it wasn't clearing the whole array.  I suspect this is a bug and so
  > using calloc to clear the whole thing is okay, but I wanted to be
  > sure.  Also if using calloc is not okay, then this bug in the call to
  > bzero should be fixed (if it is a bug.)
Let's fix the bzero call in this round.

  > 	* gcse.c: Include system.h and output.h.
  > 	(dump_cuid_table, dump_rd_table, dump_cprop_data, dump_pre_data):
  > 	Hide prototype and definition.
  > 	(compute_can_copy): Only declare variables `reg' and `insn' when
  >  	AVOID_CCMODE_COPIES is not defined.
  > 	(record_set_info): Mark parameter `setter' with ATTRIBUTE_UNUSED.
  > 	(hash_scan_clobber): Likewise for `x' and `insn'.
  > 	(hash_scan_call): Likewise.
  > 	(record_last_set_info): Likewise for `setter'.
  > 	(mark_call): Likewise for `pat'.
  > 	(pre_insert_insn): Wrap variable `note' in macro HAVE_cc0.
For the various dump* functions, why don't we just give them external
scope or something like.  That way we can keep the debugging code
around a little longer without triggering warnings.  This pass is
still rather new, so it's nice to be able to dump its internal state
when things go wrong.

The rest of it looked OK to me.

jeff


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