diff options
Diffstat (limited to 'gcc/dwarf2out.c')
-rw-r--r-- | gcc/dwarf2out.c | 30 |
1 files changed, 17 insertions, 13 deletions
diff --git a/gcc/dwarf2out.c b/gcc/dwarf2out.c index 9bf0803ce57..b3f0a58e64d 100644 --- a/gcc/dwarf2out.c +++ b/gcc/dwarf2out.c @@ -380,7 +380,7 @@ struct indirect_string_node GTY(()) { const char *str; unsigned int refcount; - unsigned int form; + enum dwarf_form form; char *label; }; @@ -3396,7 +3396,8 @@ struct dwarf_file_data GTY(()) /* We need some way to distinguish DW_OP_addr with a direct symbol relocation from DW_OP_addr with a dtp-relative symbol relocation. */ -#define INTERNAL_DW_OP_tls_addr (0x100 + DW_OP_addr) +#define INTERNAL_DW_OP_tls_addr \ + ((enum dwarf_location_atom) (0x100 + DW_OP_addr)) typedef struct dw_val_struct *dw_val_ref; @@ -3866,12 +3867,13 @@ new_reg_loc_descr (unsigned int reg, unsigned HOST_WIDE_INT offset) if (offset) { if (reg <= 31) - return new_loc_descr (DW_OP_breg0 + reg, offset, 0); + return new_loc_descr ((enum dwarf_location_atom) (DW_OP_breg0 + reg), + offset, 0); else return new_loc_descr (DW_OP_bregx, reg, offset); } else if (reg <= 31) - return new_loc_descr (DW_OP_reg0 + reg, 0, 0); + return new_loc_descr ((enum dwarf_location_atom) (DW_OP_reg0 + reg), 0, 0); else return new_loc_descr (DW_OP_regx, reg, 0); } @@ -4975,7 +4977,7 @@ static hashval_t debug_str_do_hash (const void *); static int debug_str_eq (const void *, const void *); static void add_AT_string (dw_die_ref, enum dwarf_attribute, const char *); static inline const char *AT_string (dw_attr_ref); -static int AT_string_form (dw_attr_ref); +static enum dwarf_form AT_string_form (dw_attr_ref); static void add_AT_die_ref (dw_die_ref, enum dwarf_attribute, dw_die_ref); static void add_AT_specification (dw_die_ref, dw_die_ref); static inline dw_die_ref AT_ref (dw_attr_ref); @@ -5969,7 +5971,7 @@ AT_string (dw_attr_ref a) /* Find out whether a string should be output inline in DIE or out-of-line in .debug_str section. */ -static int +static enum dwarf_form AT_string_form (dw_attr_ref a) { struct indirect_string_node *node; @@ -9759,13 +9761,13 @@ int_loc_descriptor (HOST_WIDE_INT i) if (i >= 0) { if (i <= 31) - op = DW_OP_lit0 + i; + op = (enum dwarf_location_atom) (DW_OP_lit0 + i); else if (i <= 0xff) op = DW_OP_const1u; else if (i <= 0xffff) op = DW_OP_const2u; else if (HOST_BITS_PER_WIDE_INT == 32 - || i <= 0xffffffff) + || i <= (HOST_WIDE_INT) 0xffffffff) op = DW_OP_const4u; else op = DW_OP_constu; @@ -9777,7 +9779,7 @@ int_loc_descriptor (HOST_WIDE_INT i) else if (i >= -0x8000) op = DW_OP_const2s; else if (HOST_BITS_PER_WIDE_INT == 32 - || i >= -0x80000000) + || i >= (HOST_WIDE_INT) -0x80000000) op = DW_OP_const4s; else op = DW_OP_consts; @@ -9852,7 +9854,8 @@ based_loc_descr (rtx reg, HOST_WIDE_INT offset, regno = dbx_reg_number (reg); if (regno <= 31) - result = new_loc_descr (DW_OP_breg0 + regno, offset, 0); + result = new_loc_descr ((enum dwarf_location_atom) (DW_OP_breg0 + regno), + offset, 0); else result = new_loc_descr (DW_OP_bregx, regno, offset); @@ -10380,8 +10383,8 @@ loc_descriptor_from_tree_1 (tree loc, int want_address) if (DECL_THREAD_LOCAL_P (loc)) { rtx rtl; - unsigned first_op; - unsigned second_op; + enum dwarf_location_atom first_op; + enum dwarf_location_atom second_op; if (targetm.have_tls) { @@ -12733,7 +12736,8 @@ add_calling_convention_attribute (dw_die_ref subr_die, tree decl) { enum dwarf_calling_convention value = DW_CC_normal; - value = targetm.dwarf_calling_convention (TREE_TYPE (decl)); + value = ((enum dwarf_calling_convention) + targetm.dwarf_calling_convention (TREE_TYPE (decl))); /* DWARF doesn't provide a way to identify a program's source-level entry point. DW_AT_calling_convention attributes are only meant |