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 ppc-linux build


Hi!

POINTER_SIZE (DWARF2_ADDR_SIZE is POINTER_SIZE / BITS_PER_UNIT) is unsigned
variable on powerpc, unlike all other targets where it is a small integer
constant.  So, only on powerpc gcc warns (errors with -Werror) on comparison
of it with a signed integer.

Bootstrapped/regtested, committed to trunk.

2009-09-22  Jakub Jelinek  <jakub@redhat.com>

	* dwarf2out.c (address_of_int_loc_descriptor): Avoid signed/unsigned
	comparison warning on rs6000.

--- gcc/dwarf2out.c.jj3	2009-09-21 23:30:04.000000000 +0200
+++ gcc/dwarf2out.c	2009-09-21 23:46:59.000000000 +0200
@@ -10936,7 +10936,7 @@ address_of_int_loc_descriptor (int size,
      + 1 (mode size)
      and for DW_OP_implicit_value:
      1 (DW_OP_implicit_value) + 1 (length) + mode_size.  */
-  if (DWARF2_ADDR_SIZE >= size
+  if ((int) DWARF2_ADDR_SIZE >= size
       && litsize + 1 + 1 + 1 < 1 + 1 + size)
     {
       loc_result = int_loc_descriptor (i);

	Jakub


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