This is the mail archive of the gcc@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: Recent patch neglects to update tree.h - causes bootstrapfailure


"Zack Weinberg" <zack@codesourcery.com> writes:

> "Zack Weinberg" <zack@codesourcery.com> writes:
>
>> This patch
>>
>> 2003-10-25  Jan Hubicka  <jh@suse.cz>
>>
>>         * dwarf2out.c (dw_cfi_oprnd_struct): Offset is HOST_WIDE_INT.
>>         (cfa_loc): Likewise.
>>         (reg_save, stack_adjust_offset, queue_reg_save): Replace long by
>>         HOST_WIDE_INT.
>>         (args_size, old_args_size): change type to HOST_WIDE_INT.
>>         (dwarf2out_def_cfa, dwarf2out_args_size,
>>         dwarf2out_reg_save, new_loc_descr): offset is HOST_WIDE_INT.
>>         (dw_val_struct): integers, unsigneds and offsets are HOST_WIDE_INT.
>>         (add_AT_int, add_AT_unsigned, att_AT_offset, AT_int, AT_unsigned,
>>         AT_offset): Use HOST_WIDE_INT.
>>         (based_loc_descr): offset is HOST_WIDE_INT.
>>         (add_data_member): Likewise.
>>         (add_const_value_attribute): Simplify.
>>
>> breaks bootstrap on any target where HOST_WIDE_INT != long, because
>> tree.h still has several declarations with 'long' types
>
> ... and also because you have a bunch of HOST_WIDE_INT quantities
> being printed with %l[xdu] not HOST_WIDE_INT_PRINT_{HEX,DEC,UNSIGNED}.

I only found the following two places by visual inspection.  Did you
receive more warnings?

I'll test the patch now on i686-linux-gnu and x86_64-linux-gnu and
will commit as obvious after testing,

Andreas

2003-10-26  Andreas Jaeger  <aj@suse.de>

	* dwarf2out.c (output_cfi): Use HOST_WIDE_INT_PRINT.
	(output_die): Likewise.

============================================================
Index: gcc/dwarf2out.c
--- gcc/dwarf2out.c	25 Oct 2003 21:32:02 -0000	1.460
+++ gcc/dwarf2out.c	26 Oct 2003 08:42:03 -0000
@@ -1791,7 +1791,7 @@ output_cfi (dw_cfi_ref cfi, dw_fde_ref f
   if (cfi->dw_cfi_opc == DW_CFA_advance_loc)
     dw2_asm_output_data (1, (cfi->dw_cfi_opc
 			     | (cfi->dw_cfi_oprnd1.dw_cfi_offset & 0x3f)),
-			 "DW_CFA_advance_loc 0x%lx",
+			 "DW_CFA_advance_loc " HOST_WIDE_INT_PRINT_HEX,
 			 cfi->dw_cfi_oprnd1.dw_cfi_offset);
   else if (cfi->dw_cfi_opc == DW_CFA_offset)
     {
@@ -6556,7 +6556,7 @@ output_die (dw_die_ref die)
 	  {
 	    char *p = strchr (ranges_section_label, '\0');
 
-	    sprintf (p, "+0x%lx", a->dw_attr_val.v.val_offset);
+	    sprintf (p, "+" HOST_WIDE_INT_PRINT_HEX, a->dw_attr_val.v.val_offset);
 	    dw2_asm_output_offset (DWARF_OFFSET_SIZE, ranges_section_label,
 				   "%s", name);
 	    *p = '\0';

-- 
 Andreas Jaeger, aj@suse.de, http://www.suse.de/~aj
  SuSE Linux AG, Deutschherrnstr. 15-19, 90429 Nürnberg, Germany
   GPG fingerprint = 93A3 365E CE47 B889 DF7F  FED1 389A 563C C272 A126

Attachment: pgp00000.pgp
Description: PGP signature


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