diff mbox

fix PR bootstrap/44825, Werror=sign-compare error

Message ID 20100705192442.GM17877@codesourcery.com
State New
Headers show

Commit Message

Nathan Froyd July 5, 2010, 7:24 p.m. UTC
The patch below makes the obvious fix for PR 44825.  I'm asking for
approval, though, because I don't have an convenient way to do bootstrap on a
32-bit HWI host.  (H.J.'s suggestion in the PR does not work for me,
presumably because of Ubuntu weirdness.)  If somebody wanted to quickly
toss this into their tree, that would be much appreciated.

OK to commit?

-Nathan

	PR bootstrap/44825
	* class.c (make_class_data): Cast result of VEC_length calls to int.

Index: ChangeLog
===================================================================

Comments

H.J. Lu July 5, 2010, 10:17 p.m. UTC | #1
On Mon, Jul 5, 2010 at 12:24 PM, Nathan Froyd <froydnj@codesourcery.com> wrote:
> The patch below makes the obvious fix for PR 44825.  I'm asking for
> approval, though, because I don't have an convenient way to do bootstrap on a
> 32-bit HWI host.  (H.J.'s suggestion in the PR does not work for me,
> presumably because of Ubuntu weirdness.)  If somebody wanted to quickly
> toss this into their tree, that would be much appreciated.
> OK to commit?
>
> -Nathan
>
>        PR bootstrap/44825
>        * class.c (make_class_data): Cast result of VEC_length calls to int.
>

This passed the previous failure. Can you check it in?

Thanks.
Andrew Haley July 6, 2010, 8:23 a.m. UTC | #2
On 07/05/2010 08:24 PM, Nathan Froyd wrote:
> The patch below makes the obvious fix for PR 44825.  I'm asking for
> approval, though, because I don't have an convenient way to do bootstrap on a
> 32-bit HWI host.  (H.J.'s suggestion in the PR does not work for me,
> presumably because of Ubuntu weirdness.)  If somebody wanted to quickly
> toss this into their tree, that would be much appreciated.
> 
> OK to commit?
> 
> -Nathan
> 
> 	PR bootstrap/44825
> 	* class.c (make_class_data): Cast result of VEC_length calls to int.

Sure.  It's obvious, right?  :-)

Andrew.
diff mbox

Patch

Index: class.c
===================================================================
--- class.c	(revision 161839)
+++ class.c	(working copy)
@@ -1921,9 +1921,9 @@  make_class_data (tree type)
     }
 
   gcc_assert (static_field_count
-              == VEC_length (constructor_elt, static_fields));
+              == (int) VEC_length (constructor_elt, static_fields));
   gcc_assert (instance_field_count
-              == VEC_length (constructor_elt, instance_fields));
+              == (int) VEC_length (constructor_elt, instance_fields));
 
   if (field_count > 0)
     {