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]
Other format: [Raw text]

[Committed] Fix signed/unsigned comparison warning in expr.c


My apologies for the inconvenience.  Jerry DeLisle and Andrew Pinski
pointed out on IRC that my earlier patch to resolve PR17959 causes a
bootstrap failure on some platforms due to a signed vs. unsigned
comparison warning.  Unfortunately, neither powerpc-unknown-linux-gnu
nor x86_64-unknown-linux-gnu were affected, so this wasn't spotted by
my testing or post-commit bootstrap.  Fixed with the "obvious" patch
below.

Committed to mainline as revision 112567.



2006-03-30  Roger Sayle  <roger@eyesopen.com>

	* expr.c (emit_group_store): Make bytepos a HOST_WIDE_INT to
	signed vs. unsigned comparison failures on some hosts.



Index: expr.c
===================================================================
*** expr.c	(revision 112566)
--- expr.c	(working copy)
*************** emit_group_store (rtx orig_dst, rtx src,
*** 1926,1932 ****
      {
        enum machine_mode outer = GET_MODE (dst);
        enum machine_mode inner;
!       unsigned int bytepos;
        bool done = false;
        rtx temp;

--- 1926,1932 ----
      {
        enum machine_mode outer = GET_MODE (dst);
        enum machine_mode inner;
!       HOST_WIDE_INT bytepos;
        bool done = false;
        rtx temp;


Roger
--


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