From patchwork Mon Jul 5 19:24:43 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: fix PR bootstrap/44825, Werror=sign-compare error Date: Mon, 05 Jul 2010 09:24:43 -0000 From: Nathan Froyd X-Patchwork-Id: 57924 Message-Id: <20100705192442.GM17877@codesourcery.com> To: gcc-patches@gcc.gnu.org, java-patches@gcc.gnu.org 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 =================================================================== 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) {