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]

Re: [PATCH] Conservative alignment tracking (2nd try)


On Thu, Aug 12, 2010 at 06:38:25AM -0700, H.J. Lu wrote:
> On Wed, Aug 11, 2010 at 5:32 AM, Richard Guenther <rguenther@suse.de> wrote:
> It breaks bootstrap on Linux/i386:
> 
> ../../src-trunk/gcc/builtins.c: In function 'fold_builtin_memory_op':
> ../../src-trunk/gcc/builtins.c:8402:9: error: comparison between
> signed and unsigned integer expressions [-Werror=sign-compare]

Here is a fix I've bootstrapped on i686-linux (32-bit HWI).  Ok?

2010-08-12  Jakub Jelinek  <jakub@redhat.com>

	* builtins.c (fold_builtin_memory_op): Avoid -Wsign-compare
	warning.

--- gcc/builtins.c.jj	2010-08-12 14:07:37.000000000 +0200
+++ gcc/builtins.c	2010-08-12 14:41:39.740220087 +0200
@@ -8399,7 +8399,7 @@ fold_builtin_memory_op (location_t loc, 
 	  if (readonly_data_expr (src)
 	      || (host_integerp (len, 1)
 		  && (MIN (src_align, dest_align) / BITS_PER_UNIT
-		      >= tree_low_cst (len, 1))))
+		      >= (unsigned HOST_WIDE_INT) tree_low_cst (len, 1))))
 	    {
 	      tree fn = implicit_built_in_decls[BUILT_IN_MEMCPY];
 	      if (!fn)


	Jakub


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