+2018-02-09 Joshua Watt <JPEWhacker@gmail.com>
+
+ * configure.ac (HAVE_FALLTHROUGH): New define.
+
2017-10-16 Mark Wielaard <mark@klomp.org>
* .gitignore: Remove tests/md5-sha1-test.
+2018-02-09 Joshua Watt <JPEWhacker@gmail.com>
+
+ * aarch64_retval.c (aarch64_return_value_location): Use FALLTHROUGH
+ macro instead of comment.
+ * alpha_retval.c (alpha_return_value_location): Likewise.
+ * arm_regs.c (arm_register_info): Likewise.
+ * arm_retval.c (arm_return_value_location): Likewise.
+ * i386_regs.c (i386_register_info): Likewise.
+ * i386_retval.c (i386_return_value_location): Likewise.
+ * ia64_retval.c (ia64_return_value_location): Likewise.
+ * linux-core-note.c (core_note): Likewise.
+ * m68k_retval.c (m68k_return_value_location): Likewise.
+ * ppc64_retval.c (ppc64_return_value_location): Likewise.
+ * ppc_regs.c (ppc_register_info): Likewise.
+ * ppc_retval.c (ppc_return_value_location): Likewise.
+ * s390_retval.c (s390_return_value_location): Likewise.
+ * sh_retval.c (sh_return_value_location): Likewise.
+ * sparc_retval.c (sparc_return_value_location): Likewise.
+ * tilegx_retval.c (tilegx_return_value_location): Likewise.
+ * x86_64_regs.c (x86_64_register_info): Likewise.
+ * x86_64_retval.c (x86_64_return_value_location): Likewise.
+
2017-10-24 Mark Wielaard <mark@klomp.org>
* Makefile.am (m68k_corenote_no_Wpacked_not_aligned): New variable.
assert (count > 0);
if (count <= 4)
return pass_hfa (locp, base_size, count);
- /* Fall through. */
+ FALLTHROUGH;
case 1:
/* Not a HFA. */
typedie = dwarf_formref_die (attr, &die_mem);
tag = DWARF_TAG_OR_RETURN (typedie);
}
- /* Fall through. */
+ FALLTHROUGH;
case DW_TAG_base_type:
case DW_TAG_enumeration_type:
}
}
- /* Else fall through. */
+ FALLTHROUGH;
case DW_TAG_structure_type:
case DW_TAG_class_type:
case 16 + 0 ... 16 + 7:
regno += 96 - 16;
- /* Fall through. */
+ FALLTHROUGH;
case 96 + 0 ... 96 + 7:
*setname = "FPA";
*type = DW_ATE_float;
typedie = dwarf_formref_die (attr, &die_mem);
tag = DWARF_TAG_OR_RETURN (typedie);
}
- /* Fall through. */
+ FALLTHROUGH;
case DW_TAG_base_type:
case DW_TAG_enumeration_type:
case 5:
case 8:
*type = DW_ATE_address;
- /* Fallthrough */
+ FALLTHROUGH;
case 0 ... 3:
case 6 ... 7:
name[0] = 'e';
typedie = dwarf_formref_die (attr, &die_mem);
tag = DWARF_TAG_OR_RETURN (typedie);
}
- /* Fall through. */
+ FALLTHROUGH;
case DW_TAG_base_type:
case DW_TAG_enumeration_type:
if (size <= 8)
return nloc_intregpair;
}
- /* Fallthrough */
+ FALLTHROUGH;
case DW_TAG_structure_type:
case DW_TAG_class_type:
typedie = dwarf_formref_die (attr, &die_mem);
tag = DWARF_TAG_OR_RETURN (typedie);
}
- /* Fall through. */
+ FALLTHROUGH;
case DW_TAG_base_type:
case DW_TAG_enumeration_type:
if (memcmp (name, "CORE", nhdr->n_namesz) == 0)
break;
/* Buggy old Linux kernels didn't terminate "LINUX". */
- /* Fall through. */
+ FALLTHROUGH;
case sizeof "LINUX":
if (memcmp (name, "LINUX", nhdr->n_namesz) == 0)
typedie = dwarf_formref_die (attr, &die_mem);
tag = DWARF_TAG_OR_RETURN (typedie);
}
- /* Fall through. */
+ FALLTHROUGH;
case DW_TAG_base_type:
case DW_TAG_enumeration_type:
if (size <= 8)
return nloc_intregpair;
}
- /* Fallthrough */
+ FALLTHROUGH;
case DW_TAG_structure_type:
case DW_TAG_class_type:
case DW_TAG_union_type:
typedie = dwarf_formref_die (attr, &die_mem);
tag = DWARF_TAG_OR_RETURN (typedie);
}
- /* Fall through. */
+ FALLTHROUGH;
case DW_TAG_base_type:
case DW_TAG_enumeration_type:
return nloc_intreg;
}
- /* Else fall through. */
+ FALLTHROUGH;
case DW_TAG_structure_type:
case DW_TAG_class_type:
case DW_TAG_union_type:
return nloc_vmxreg;
}
}
- /* Fall through. */
+ FALLTHROUGH;
case DW_TAG_string_type:
if (dwarf_aggregate_size (typedie, &size) == 0 && size <= 8)
case 100:
if (*bits == 32)
return stpcpy (name, "mq") + 1 - name;
- /* Fallthrough */
+ FALLTHROUGH;
case 102 ... 107:
name[0] = 's';
name[1] = 'p';
typedie = dwarf_formref_die (attr, &die_mem);
tag = DWARF_TAG_OR_RETURN (typedie);
}
- /* Fall through. */
+ FALLTHROUGH;
case DW_TAG_base_type:
case DW_TAG_enumeration_type:
return nloc_intregquad;
}
}
- /* Fall through. */
+ FALLTHROUGH;
case DW_TAG_structure_type:
case DW_TAG_class_type:
typedie = dwarf_formref_die (attr, &die_mem);
tag = DWARF_TAG_OR_RETURN (typedie);
}
- /* Fall through. */
+ FALLTHROUGH;
case DW_TAG_base_type:
case DW_TAG_enumeration_type:
return size <= asize ? nloc_intreg : nloc_intregpair;
}
}
- /* Fall through. */
+ FALLTHROUGH;
case DW_TAG_structure_type:
case DW_TAG_class_type:
typedie = dwarf_formref_die (attr, &die_mem);
tag = DWARF_TAG_OR_RETURN (typedie);
}
- /* Fall through. */
+ FALLTHROUGH;
case DW_TAG_base_type:
case DW_TAG_enumeration_type:
typedie = dwarf_formref_die (attr, &die_mem);
tag = DWARF_TAG_OR_RETURN (typedie);
}
- /* Fall through. */
+ FALLTHROUGH;
case DW_TAG_base_type:
case DW_TAG_enumeration_type:
typedie = dwarf_formref_die (attr, &die_mem);
tag = DWARF_TAG_OR_RETURN (typedie);
}
- /* Fall through. */
+ FALLTHROUGH;
case DW_TAG_base_type:
case DW_TAG_enumeration_type:
return nloc_intreg;
}
- /* Else fall through. */
+ FALLTHROUGH;
case DW_TAG_structure_type:
case DW_TAG_class_type:
case DW_TAG_union_type:
case 6 ... 7:
*type = DW_ATE_address;
- /* Fallthrough */
+ FALLTHROUGH;
case 0 ... 5:
name[0] = 'r';
name[1] = baseregs[regno][0];
typedie = dwarf_formref_die (attr, &die_mem);
tag = DWARF_TAG_OR_RETURN (typedie);
}
- /* Fall through. */
+ FALLTHROUGH;
case DW_TAG_base_type:
case DW_TAG_enumeration_type:
+2018-02-09 Joshua Watt <JPEWhacker@gmail.com>
+
+ * eu.am (IMPLICIT_FALLTHROUGH_WARNING): Set to 5.
+
2017-11-02 Mark Wielaard <mark@klomp.org>
* elfutils.spec.in: Config files under /usr/lib/sysctl.d (_sysctldir)
endif
if HAVE_IMPLICIT_FALLTHROUGH_WARNING
-IMPLICIT_FALLTHROUGH_WARNING=-Wimplicit-fallthrough
+# Use strict fallthrough. Only __attribute__((fallthrough)) will prevent the
+# warning
+IMPLICIT_FALLTHROUGH_WARNING=-Wimplicit-fallthrough=5
else
IMPLICIT_FALLTHROUGH_WARNING=
endif
AM_CONDITIONAL(HAVE_IMPLICIT_FALLTHROUGH_WARNING,
[test "x$ac_cv_implicit_fallthrough" != "xno"])
+# Assume the fallthrough attribute is supported if -Wimplict-fallthrough is supported
+if test "$ac_cv_implicit_fallthrough" = "yes"; then
+ AC_DEFINE([HAVE_FALLTHROUGH], [1],
+ [Defined if __attribute__((fallthrough)) is supported])
+fi
+
dnl Check if we have argp available from our libc
AC_LINK_IFELSE(
[AC_LANG_PROGRAM(
+2018-02-09 Joshua Watt <JPEWhacker@gmail.com>
+
+ * eu-config.h (FALLTHROUGH): New macro.
+
2017-10-16 Mark Wielaard <mark@klomp.org>
* md5.{c,h}: Removed.
# define COMPAT_VERSION(name, version, prefix) error "should use #ifdef SYMBOL_VERSIONING"
#endif
+#ifndef FALLTHROUGH
+# ifdef HAVE_FALLTHROUGH
+# define FALLTHROUGH __attribute__ ((fallthrough))
+# else
+# define FALLTHROUGH ((void) 0)
+# endif
+#endif
#endif /* eu-config.h */
+2018-02-09 Joshua Watt <JPEWhacker@gmail.com>
+
+ * i386_disasm.c (i386_disasm): Use FALLTHOUGH macro instead of
+ comment.
+
2017-08-18 Ulf Hermann <ulf.hermann@qt.io>
* memory-access.h: Use attribute_packed.
++param_start;
break;
}
- /* Fallthrough */
+ FALLTHROUGH;
default:
assert (! "INVALID not handled");
}
+2018-02-09 Joshua Watt <JPEWhacker@gmail.com>
+
+ * cfi.c (execute_cfi): Use FALLTHROUGH macro instead of comment.
+ * dwarf_frame_register.c (dwarf_frame_register): Likewise.
+
2018-01-22 Mark Wielaard <mark@klomp.org>
* Makefile.am (AM_CPPFLAGS): Add -I libdwelf.
case DW_CFA_advance_loc1:
operand = *program++;
- /* Fallthrough */
+ FALLTHROUGH;
case DW_CFA_advance_loc + 0 ... DW_CFA_advance_loc + CFI_PRIMARY_MAX:
advance_loc:
loc += operand * cie->code_alignment_factor;
case DW_CFA_restore_extended:
get_uleb128 (operand, program, end);
- /* Fallthrough */
+ FALLTHROUGH;
case DW_CFA_restore + 0 ... DW_CFA_restore + CFI_PRIMARY_MAX:
if (unlikely (abi_cfi) && likely (opcode == DW_CFA_restore))
/* Use the default rule for registers not yet mentioned in CFI. */
if (fs->cache->default_same_value)
goto same_value;
- /*FALLTHROUGH*/
+ FALLTHROUGH;
case reg_undefined:
/* The value is known to be unavailable. */
break;
+2018-02-09 Joshua Watt <JPEWhacker@gmail.com>
+
+ * dwfl_report_elf.c (__libdwfl_elf_address_range): Use FALLTHROUGH
+ macro instead of comment.
+ * frame_unwind.c (expr_eval): Likewise.
+
2017-11-20 Mark Wielaard <mark@klomp.org>
* link_map.c (do_check64): Take a char * and calculate type and val
/* An assigned base address is meaningless for these. */
base = 0;
add_p_vaddr = true;
- /* Fallthrough. */
+ FALLTHROUGH;
case ET_DYN:
default:;
size_t phnum;
}
if (val1 == 0)
break;
- /* FALLTHRU */
+ FALLTHROUGH;
case DW_OP_skip:;
Dwarf_Word offset = op->offset + 1 + 2 + (int16_t) op->number;
const Dwarf_Op *found = bsearch ((void *) (uintptr_t) offset, ops, nops,
+2018-02-09 Joshua Watt <JPEWhacker@gmail.com>
+
+ * eblobjnote.c (ebl_object_note): Use FALLTHROUGH macro instead of
+ comment.
+
2017-04-27 Ulf Hermann <ulf.hermann@qt.io>
* Makefile.am: Use fpic_CFLAGS.
free (buf);
break;
}
- /* FALLTHROUGH */
+ FALLTHROUGH;
default:
/* Unknown type. */
+2018-02-09 Joshua Watt <JPEWhacker@gmail.com>
+
+ * elf32_updatenull.c (updatenull_wrlock): Use FALLTHROUGH macro
+ instead of comment.
+ * elf_begin.c (read_unmmaped_file): Likewise.
+ (elf_begin): Likewise.
+ * elf_cntl.c (elf_cntl): Likewise.
+
2017-10-04 Mark Wielaard <mark@klomp.org>
* elf_begin.c (file_read_elf): Skip sanity checking e_shoff if scncnt
__libelf_seterrno (ELF_E_GROUP_NOT_REL);
return -1;
}
- /* FALLTHROUGH */
+ FALLTHROUGH;
case SHT_SYMTAB_SHNDX:
sh_entsize = elf_typesize (32, ELF_T_WORD, 1);
break;
? sizeof (Elf32_Ehdr) : sizeof (Elf64_Ehdr)))
return file_read_elf (fildes, NULL, mem.header, offset, maxsize, cmd,
parent);
- /* FALLTHROUGH */
+ FALLTHROUGH;
default:
break;
retval = NULL;
break;
}
- /* FALLTHROUGH */
+ FALLTHROUGH;
case ELF_C_READ:
case ELF_C_READ_MMAP:
result = -1;
break;
}
- /* FALLTHROUGH */
+ FALLTHROUGH;
case ELF_C_FDDONE:
/* Mark the file descriptor as not usable. */
+2018-02-09 Joshua Watt <JPEWhacker@gmail.com>
+
+ * addr2line.c (handle_address): Use FALLTHROUGH macro instead of
+ comment.
+ * elfcompress.c (parse_opt): Likewise.
+ * elflint.c (check_dynamic): Likewise.
+ (check_sections): Likewise.
+ (check_note_data): Likewise.
+ * objdump.c (parse_opt): Likewise.
+ * readelf.c (parse_opt): Likewise.
+ (attr_callback): Likewise.
+ (handle_auxv_note): Likewise.
+ * strings.c (parse_opt): Likewise.
+ * backtrace.c (callback_verify): Likewise.
+
2018-01-25 Mark Wielaard <mark@klomp.org>
* readelf.c (print_debug_ranges_section): Initialize cu to last_cu.
case 1:
addr = 0;
j = i;
- /* Fallthrough */
+ FALLTHROUGH;
case 2:
if (string[j] != '\0')
break;
N_("Only one input file allowed together with '-o'"));
/* We only use this for checking the number of arguments, we don't
actually want to consume them. */
- /* Fallthrough */
+ FALLTHROUGH;
default:
return ARGP_ERR_UNKNOWN;
}
if (dyn->d_tag < DT_ADDRRNGLO || dyn->d_tag > DT_ADDRRNGHI)
/* Value is no pointer. */
break;
- /* FALLTHROUGH */
+ FALLTHROUGH;
case DT_AUXILIARY:
case DT_FILTER:
case SHT_NOBITS:
if (is_debuginfo)
break;
- /* Fallthrough */
+ FALLTHROUGH;
default:
ERROR (gettext ("\
section [%2zu] '%s' has unexpected type %d for an executable section\n"),
ERROR (gettext ("\
section [%2zu] '%s': relocatable files cannot have dynamic symbol tables\n"),
cnt, section_name (ebl, cnt));
- /* FALLTHROUGH */
+ FALLTHROUGH;
case SHT_SYMTAB:
check_symtab (ebl, ehdr, shdr, cnt);
break;
if (nhdr.n_namesz == sizeof "Linux"
&& !memcmp (data->d_buf + name_offset, "Linux", sizeof "Linux"))
break;
- /* Fallthrough */
+ FALLTHROUGH;
default:
if (shndx == 0)
ERROR (gettext ("\
}
/* We only use this for checking the number of arguments, we don't
actually want to consume them. */
- /* Fallthrough */
+ FALLTHROUGH;
default:
return ARGP_ERR_UNKNOWN;
}
print_string_sections = true;
break;
}
- /* Fall through. */
+ FALLTHROUGH;
case 'x':
add_dump_section (arg, false);
any_control_option = true;
dwarf_form_name (form), (uintmax_t) num);
return DWARF_CB_OK;
}
- /* else fallthrough */
+ FALLTHROUGH;
/* These cases always take a loclistptr and no constant. */
case DW_AT_location:
print_block (block.length, block.data);
break;
}
- /* Fall through. */
+ FALLTHROUGH;
case DW_AT_location:
case DW_AT_data_location:
printf (" %s\n", name);
break;
}
- /* Fall through */
+ FALLTHROUGH;
case 'x': /* hex */
case 'p': /* address */
case 's': /* address of string */
case 'b':
case 'B':
big_endian = true;
- /* FALLTHROUGH */
+ FALLTHROUGH;
case 'l':
case 'L':
+2018-02-09 Joshua Watt <JPEWhacker@gmail.com>
+
+ * elfstrmerge.c (main): Use FALLTHROUGH macro instead of comment.
+
2018-01-22 Mark Wielaard <mark@klomp.org>
* allfcts.c (setup_alt): Print warning when alt file couldn't be
assert (symname2 == NULL || strcmp (symname2, "jmp") != 0);
break;
}
- /* FALLTHRU */
+ FALLTHROUGH;
case 4:
/* Some simple frame unwinders get this wrong and think sigusr2
is calling itself again. Allow it and just pretend there is
break;
case SHT_DYNAMIC:
- /* Fallthrough. There are string indexes in here, but
+ FALLTHROUGH;
+ /* There are string indexes in here, but
they (should) point to a allocated string table,
which we don't alter. */
default: