34 Commits

Author SHA1 Message Date
e495212d22 Sync libiberty from gcc
Picks up copyright year update and other recent fixes.
2017-01-05 00:03:07 +10:30
4d17eaece8 libiberty: Fix -Wimplicit-fallthrough warnings.
Adjust some comments, add some explicit fall through comments or explicit
returns where necessary to not get implicit-fallthrough warnings.

All fall throughs were deliberate. In one case I added an explicit return
false for clarity instead of falling through a default case (that also
would return false).

libiberty/ChangeLog:

       * cplus-dem.c (demangle_signature): Move fall through comment.
       (demangle_fund_type): Add fall through comment between 'G' and 'I'.
       * hashtab.c (iterative_hash): Add fall through comments.
       * regex.c (regex_compile): Add Fall through comment after '+'/'?'.
       (byte_re_match_2_internal): Add Fall through comment after jump_n.
       Change "Note fall through" to "Fall through".
       (common_op_match_null_string_p): Return false after set_number_at
       instead of fall through.
2016-11-18 11:06:18 +01:00
13b356b2b5 libiberty: fix warnings about left shifting a negative value.
GCC PR 66827 reports some problems with left shifting a negative
  value:

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66827

  Of the problems reported only two remain - in libiberty/regex.c:

libiberty/regex.c:6970:11: runtime error: left shift of negative value -1
libiberty/regex.c:7165:4: runtime error: left shift of negative value -1

  The patch below fixes these errors by casting the value to be shifted
  to unsigned before the shift occurs.

  No regressions were found in the libiberty testsuite or bootstrapping
  gcc (on an x86_64 target).
2016-01-05 14:58:34 -05:00
a2d010462c * regex.c (bzero) [!_LIBC]: Cast the call to memcpy to (void).
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@208558 138bc75d-0d04-0410-961f-82ee72b054a4
2014-05-08 10:18:29 -06:00
10fe779dd2 * regex.c (bzero) [!_LIBC]: Define without coma expression. (regerror): Cast the call to memcpy to (void) to avoid unused value warnings.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@208553 138bc75d-0d04-0410-961f-82ee72b054a4
2014-05-08 10:18:29 -06:00
632a40b341 merge from gcc 2013-07-22 18:03:12 +00:00
44b6b9d4f9 merge from gcc 2013-07-21 17:19:10 +00:00
389d9b6c50 merge from gcc 2013-02-09 19:22:49 +00:00
4ff224cb8d merge from gcc 2011-04-20 19:06:46 +00:00
45ecb02a77 merge from gcc 2010-04-07 21:16:24 +00:00
664aa91f58 merge from gcc 2009-10-02 18:23:01 +00:00
a05e8785c7 merge from gcc 2009-09-11 16:05:46 +00:00
1e9cc1c27b * po/bfd.pot: Updated by the Translation project.
* po/binutils.pot: Updated by the Translation project.
        * po/gold.pot: Updated by the Translation project.
        * po/gold.pot: Updated by the Translation project.
        * po/gprof.pot: Updated by the Translation project.
        * po/sv.po: Updated Swedish translation.
        * po/ld.pot: Updated by the Translation project.
        * po/fi.po: Updated Finnish translation.
        * po/ld.pot: Updated by the Translation project.
        * po/fi.po: Updated Finnish translation.

        Updated sources to compile cleanly with -Wc++-compat:
        * basic_blocks.c: Add casts.
        * cg_dfn.c: Add cast.
        * corefile.c: Add casts.
        * gmon_io.c: Add casts.
        * hist.c: Add cast.
        * source.c: Add cast.
        * sym_ids.c (struct match): Moved to top level.

        Updated soruces in ld/* to compile cleanly with -Wc++-compat:
        * ld.h (enum endian_enum,enum symbolic_enum,enum dynamic_list_enum): Move to top level.
        * ldcref.c: Add casts.
        * ldctor.c: Add casts.
        * ldexp.c
        * ldexp.h (enum node_tree_enum,enum phase_enum): Move to top level.
        * ldlang.c: Add casts. (lang_insert_orphan): Use enum name instead of integer.
        * ldlang.h (enum statement_enum): Move to top level.
        * ldmain.c: Add casts.
        * ldwrite.c: Add casts.
        * lexsup.c: Add casts. (enum control_enum): Move to top level.
        * mri.c: Add casts. (mri_draw_tree): Use enum name instead of integer.

        Updated sources to compile cleanly with -Wc++-compat:
        * basic_blocks.c: Add casts.
        * cg_dfn.c: Add cast.
        * corefile.c: Add casts.
        * gmon_io.c: Add casts.
        * hist.c: Add cast.
        * source.c: Add cast.
        * sym_ids.c (struct match): Moved to top level.

        * as.c (main): Call dwarf2_init.
        * config/obj-elf.c (struct group_list): New field.
        (build_group_lists): Use hash lookup.
        (free_section_idx): New function.
        (elf_frob_file): Adjust.
        * dwarf2dbg.c (all_segs_hash, last_seg_ptr): New variables.
        (get_line_subseg): Adjust.
        (dwarf2_init): New function.
        * dwarf2dbg.h (dwarf2_init): New declaration.
2009-09-11 15:27:38 +00:00
6038baea6c merge from gcc 2005-07-22 04:28:52 +00:00
4fe190829b merge from gcc 2005-07-15 02:00:50 +00:00
f2942ea4dd merge from gcc 2005-07-12 10:35:00 +00:00
979c05d324 Update the address and phone number of the FSF organization. 2005-05-10 15:33:34 +00:00
776dbd277f merge from gcc 2005-04-13 01:06:55 +00:00
ea7143ac88 merge from gcc 2005-04-13 01:05:22 +00:00
e064c173c6 merge from gcc 2005-03-28 17:14:34 +00:00
3e0f14040c merge from gcc 2004-11-20 03:00:47 +00:00
f937530551 merge from gcc 2004-02-17 02:11:39 +00:00
258a4893ff merge from gcc 2003-04-15 15:27:20 +00:00
585cc78f65 merge from gcc 2002-09-20 13:45:20 +00:00
01cea6990b merge from gcc 2002-09-06 00:03:11 +00:00
a2832523bf merge from gcc 2002-08-07 21:01:25 +00:00
941d74a0b0 merge from gcc 2001-11-16 22:31:03 +00:00
dc5790516e merge from gcc 2001-11-15 19:06:06 +00:00
1a78a35acf merge from gcc 2001-11-13 03:54:15 +00:00
dc67663583 merge from gcc 2001-08-23 16:38:09 +00:00
a9022147a2 merge from gcc 2001-08-13 02:25:01 +00:00
86710ce268 merge from gcc 2001-07-30 17:39:28 +00:00
6ad8a379a0 merge from gcc 2001-07-19 00:04:29 +00:00
2a6ef46975 merge from gcc 2001-07-11 00:15:54 +00:00