Merge libiberty from gcc
authorAlan Modra <amodra@gmail.com>
Sun, 7 Apr 2019 11:11:49 +0000 (20:41 +0930)
committerAlan Modra <amodra@gmail.com>
Sun, 7 Apr 2019 11:19:49 +0000 (20:49 +0930)
include/ChangeLog
include/longlong.h
libiberty/ChangeLog
libiberty/cp-demangle.c
libiberty/cp-demangle.h
libiberty/floatformat.c
libiberty/functions.texi
libiberty/hashtab.c
libiberty/simple-object.c
libiberty/strerror.c

index 0a6759ffa4a949b16f53c4dbfcebab9618ad093e..e61a4bdc4b69dae955917a801f181d8dc5feef6c 100644 (file)
@@ -1,3 +1,11 @@
+2019-04-07  Alan Modra  <amodra@gmail.com>
+
+       Merge from gcc.
+       2019-04-03  Vineet Gupta  <vgupta@synopsys.com>
+       PR89877
+       * longlong.h [__arc__] (add_ssaaaa): Add cc clobber.
+       (sub_ddmmss): Likewise.
+
 2019-04-06  H.J. Lu  <hongjiu.lu@intel.com>
 
        * bfdlink.h (bfd_link_info): Remove x86-specific linker options.
index 3dd8dc3aa80cf51d7e96efb2f8b6a0a60ab60cd3..1f0ce4204255945d2c19ba73c0a4910d10145a93 100644 (file)
@@ -199,7 +199,8 @@ extern UDItype __udiv_qrnnd (UDItype *, UDItype, UDItype, UDItype);
           : "%r" ((USItype) (ah)),                                     \
             "rICal" ((USItype) (bh)),                                  \
             "%r" ((USItype) (al)),                                     \
-            "rICal" ((USItype) (bl)))
+            "rICal" ((USItype) (bl))                                   \
+          : "cc")
 #define sub_ddmmss(sh, sl, ah, al, bh, bl) \
   __asm__ ("sub.f      %1, %4, %5\n\tsbc       %0, %2, %3"             \
           : "=r" ((USItype) (sh)),                                     \
@@ -207,7 +208,8 @@ extern UDItype __udiv_qrnnd (UDItype *, UDItype, UDItype, UDItype);
           : "r" ((USItype) (ah)),                                      \
             "rICal" ((USItype) (bh)),                                  \
             "r" ((USItype) (al)),                                      \
-            "rICal" ((USItype) (bl)))
+            "rICal" ((USItype) (bl))                                   \
+          : "cc")
 
 #define __umulsidi3(u,v) ((UDItype)(USItype)u*(USItype)v)
 #ifdef __ARC_NORM__
index c9ff317b6fd2edece4e5ced6291434ab63e624f6..031be3a974a2dcc656d34e5bf36ca2ed63cdf857 100644 (file)
@@ -1,13 +1,45 @@
+2019-04-07  Alan Modra  <amodra@gmail.com>
+
+       * functions.texi: Regenerate.
+
+2019-03-14  Jason Merrill  <jason@redhat.com>
+           Jakub Jelinek  <jakub@redhat.com>
+
+       * hashtab.c (htab_remove_elt_with_hash): Return if slot is NULL rather
+       than if *slot is HTAB_EMPTY_ENTRY.
+
 2019-02-11  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
 
        * splay-tree.c (splay_tree_insert): Also release old KEY in case
        of insertion of a key equal to an already present key.
        (splay_tree_new_typed_alloc): Update comment.
 
+2019-01-22  Nidal Faour  <nidal.faour@wdc.com>
+
+       PR lto/88422
+       * simple-object.c (O_BINARY): Define if not already defined.
+       (simple_object_copy_lto_debug_sections): Create file in binary
+       mode.
+
 2019-01-21  Tom Tromey  <tom@tromey.com>
 
        * splay-tree.c (splay_tree_remove): Delete the key if necessary.
 
+2019-01-14  Tom Honermann  <tom@honermann.net>
+
+       * cp-demangle.c (cplus_demangle_builtin_types)
+       (cplus_demangle_type): Add name demangling for char8_t (Du).
+       * cp-demangle.h: Increase D_BUILTIN_TYPE_COUNT to accommodate the
+       new char8_t type.
+
+2019-01-09  Sandra Loosemore  <sandra@codesourcery.com>
+
+       PR other/16615
+
+       * cp-demangle.c: Mechanically replace "can not" with "cannot".
+       * floatformat.c: Likewise.
+       * strerror.c: Likewise.
+
 2019-01-01  Jakub Jelinek  <jakub@redhat.com>
 
        Update copyright years.
index 4624cd5fb2f93d3e5339e6d78a34cd23f88f605d..b34b4856922349b25b8a55c094aafd8fbff84783 100644 (file)
@@ -2364,9 +2364,10 @@ cplus_demangle_builtin_types[D_BUILTIN_TYPE_COUNT] =
   /* 27 */ { NL ("decimal64"), NL ("decimal64"),       D_PRINT_DEFAULT },
   /* 28 */ { NL ("decimal128"),        NL ("decimal128"),      D_PRINT_DEFAULT },
   /* 29 */ { NL ("half"),      NL ("half"),            D_PRINT_FLOAT },
-  /* 30 */ { NL ("char16_t"),  NL ("char16_t"),        D_PRINT_DEFAULT },
-  /* 31 */ { NL ("char32_t"),  NL ("char32_t"),        D_PRINT_DEFAULT },
-  /* 32 */ { NL ("decltype(nullptr)"), NL ("decltype(nullptr)"),
+  /* 30 */ { NL ("char8_t"),   NL ("char8_t"),         D_PRINT_DEFAULT },
+  /* 31 */ { NL ("char16_t"),  NL ("char16_t"),        D_PRINT_DEFAULT },
+  /* 32 */ { NL ("char32_t"),  NL ("char32_t"),        D_PRINT_DEFAULT },
+  /* 33 */ { NL ("decltype(nullptr)"), NL ("decltype(nullptr)"),
             D_PRINT_DEFAULT },
 };
 
@@ -2654,14 +2655,19 @@ cplus_demangle_type (struct d_info *di)
          ret = d_make_builtin_type (di, &cplus_demangle_builtin_types[29]);
          di->expansion += ret->u.s_builtin.type->len;
          break;
+       case 'u':
+         /* char8_t */
+         ret = d_make_builtin_type (di, &cplus_demangle_builtin_types[30]);
+         di->expansion += ret->u.s_builtin.type->len;
+         break;
        case 's':
          /* char16_t */
-         ret = d_make_builtin_type (di, &cplus_demangle_builtin_types[30]);
+         ret = d_make_builtin_type (di, &cplus_demangle_builtin_types[31]);
          di->expansion += ret->u.s_builtin.type->len;
          break;
        case 'i':
          /* char32_t */
-         ret = d_make_builtin_type (di, &cplus_demangle_builtin_types[31]);
+         ret = d_make_builtin_type (di, &cplus_demangle_builtin_types[32]);
          di->expansion += ret->u.s_builtin.type->len;
          break;
 
@@ -2687,7 +2693,7 @@ cplus_demangle_type (struct d_info *di)
 
         case 'n':
           /* decltype(nullptr) */
-         ret = d_make_builtin_type (di, &cplus_demangle_builtin_types[32]);
+         ret = d_make_builtin_type (di, &cplus_demangle_builtin_types[33]);
          di->expansion += ret->u.s_builtin.type->len;
          break;
 
@@ -6201,13 +6207,13 @@ cplus_demangle_init_info (const char *mangled, int options, size_t len,
 
   di->n = mangled;
 
-  /* We can not need more components than twice the number of chars in
+  /* We cannot need more components than twice the number of chars in
      the mangled string.  Most components correspond directly to
      chars, but the ARGLIST types are exceptions.  */
   di->num_comps = 2 * len;
   di->next_comp = 0;
 
-  /* Similarly, we can not need more substitutions than there are
+  /* Similarly, we cannot need more substitutions than there are
      chars in the mangled string.  */
   di->num_subs = len;
   di->next_sub = 0;
index b739bdfb8a4a17a738c8a2c54134d51611937687..92191cf3ea8a45a52f4d63943795b825963ce1aa 100644 (file)
@@ -176,7 +176,7 @@ d_advance (struct d_info *di, int i)
 extern const struct demangle_operator_info cplus_demangle_operators[];
 #endif
 
-#define D_BUILTIN_TYPE_COUNT (33)
+#define D_BUILTIN_TYPE_COUNT (34)
 
 CP_STATIC_IF_GLIBCPP_V3
 const struct demangle_builtin_type_info
index 2c6c6abe77fb233ee6cbf8715b0450e99d2327a9..8632253b4c14f4341384c814db8dc48d9de0f683 100644 (file)
@@ -489,7 +489,7 @@ floatformat_to_double (const struct floatformat *fmt,
       int nan = mant_bits_set (fmt, ufrom);
 
       /* On certain systems (such as GNU/Linux), the use of the
-        INFINITY macro below may generate a warning that can not be
+        INFINITY macro below may generate a warning that cannot be
         silenced due to a bug in GCC (PR preprocessor/11931).  The
         preprocessor fails to recognise the __extension__ keyword in
         conjunction with the GNU/C99 extension for hexadecimal
index 24dcc373ac044eb1fe736f735f06a1311db65ab4..1784ae720a1b935378b52b74e3f20ce407364e50 100644 (file)
@@ -84,7 +84,7 @@ is respectively less than, matching, or greater than the array member.
 
 @end deftypefn
 
-@c argv.c:135
+@c argv.c:138
 @deftypefn Extension char** buildargv (char *@var{sp})
 
 Given a pointer to a string, parse the string extracting fields
@@ -148,7 +148,7 @@ not recommended.
 
 @end deftypefn
 
-@c make-temp-file.c:96
+@c make-temp-file.c:95
 @deftypefn Replacement const char* choose_tmpdir ()
 
 Returns a pointer to a directory path suitable for creating temporary
@@ -175,7 +175,7 @@ Concatenate zero or more of strings and return the result in freshly
 
 @end deftypefn
 
-@c argv.c:470
+@c argv.c:487
 @deftypefn Extension int countargv (char * const *@var{argv})
 
 Return the number of elements in @var{argv}.
@@ -183,7 +183,7 @@ Returns zero if @var{argv} is NULL.
 
 @end deftypefn
 
-@c crc32.c:141
+@c crc32.c:140
 @deftypefn Extension {unsigned int} crc32 (const unsigned char *@var{buf}, @
   int @var{len}, unsigned int @var{init})
 
@@ -192,10 +192,9 @@ starting value is @var{init}; this may be used to compute the CRC of
 data split across multiple buffers by passing the return value of each
 call as the @var{init} parameter of the next.
 
-This is intended to match the CRC used by the @command{gdb} remote
-protocol for the @samp{qCRC} command.  In order to get the same
-results as gdb for a block of data, you must pass the first CRC
-parameter as @code{0xffffffff}.
+This is used by the @command{gdb} remote protocol for the @samp{qCRC}
+command.  In order to get the same results as gdb for a block of data,
+you must pass the first CRC parameter as @code{0xffffffff}.
 
 This CRC can be specified as:
 
@@ -212,7 +211,7 @@ make it easy to compose the values of multiple blocks.
 
 @end deftypefn
 
-@c argv.c:52
+@c argv.c:59
 @deftypefn Extension char** dupargv (char * const *@var{vector})
 
 Duplicate an argument vector.  Simply scans through @var{vector},
@@ -223,7 +222,7 @@ argument vector.
 
 @end deftypefn
 
-@c strerror.c:567
+@c strerror.c:572
 @deftypefn Extension int errno_max (void)
 
 Returns the maximum @code{errno} value for which a corresponding
@@ -241,7 +240,7 @@ symbolic name or message.
 
 @end deftypefn
 
-@c argv.c:341
+@c argv.c:344
 @deftypefn Extension void expandargv (int *@var{argcp}, char ***@var{argvp})
 
 The @var{argcp} and @code{argvp} arguments are pointers to the usual
@@ -410,7 +409,7 @@ unchanged.
 
 @end deftypefn
 
-@c argv.c:90
+@c argv.c:93
 @deftypefn Extension void freeargv (char **@var{vector})
 
 Free an argument vector that was built using @code{buildargv}.  Simply
@@ -431,7 +430,7 @@ unchanged.
 
 @end deftypefn
 
-@c getruntime.c:82
+@c getruntime.c:86
 @deftypefn Replacement long get_run_time (void)
 
 Returns the time used so far, in microseconds.  If possible, this is
@@ -515,7 +514,7 @@ systems.
 
 @end deftypefn
 
-@c safe-ctype.c:25
+@c safe-ctype.c:24
 @defvr Extension HOST_CHARSET
 This macro indicates the basic character set and encoding used by the
 host: more precisely, the encoding used for character constants in
@@ -537,7 +536,7 @@ nineteen EBCDIC varying characters is tested; exercise caution.)
 @end ftable
 @end defvr
 
-@c hashtab.c:328
+@c hashtab.c:327
 @deftypefn Supplemental htab_t htab_create_typed_alloc (size_t @var{size}, @
 htab_hash @var{hash_f}, htab_eq @var{eq_f}, htab_del @var{del_f}, @
 htab_alloc @var{alloc_tab_f}, htab_alloc @var{alloc_f}, @
@@ -586,7 +585,7 @@ struct qelem @{
 
 @end deftypefn
 
-@c safe-ctype.c:46
+@c safe-ctype.c:45
 @deffn  Extension ISALPHA  (@var{c})
 @deffnx Extension ISALNUM  (@var{c})
 @deffnx Extension ISBLANK  (@var{c})
@@ -636,7 +635,7 @@ false for characters with numeric values from 128 to 255.
 @end itemize
 @end deffn
 
-@c safe-ctype.c:95
+@c safe-ctype.c:94
 @deffn  Extension ISIDNUM         (@var{c})
 @deffnx Extension ISIDST          (@var{c})
 @deffnx Extension IS_VSPACE       (@var{c})
@@ -684,7 +683,7 @@ components will be simplified.  The returned value will be allocated using
 
 @end deftypefn
 
-@c make-relative-prefix.c:24
+@c make-relative-prefix.c:23
 @deftypefn Extension {const char*} make_relative_prefix (const char *@var{progname}, @
   const char *@var{bin_prefix}, const char *@var{prefix})
 
@@ -710,7 +709,7 @@ relative prefix can be found, return @code{NULL}.
 
 @end deftypefn
 
-@c make-temp-file.c:174
+@c make-temp-file.c:173
 @deftypefn Replacement char* make_temp_file (const char *@var{suffix})
 
 Return a temporary file name (as a string) or @code{NULL} if unable to
@@ -791,7 +790,7 @@ Sets the first @var{count} bytes of @var{s} to the constant byte
 
 @end deftypefn
 
-@c mkstemps.c:58
+@c mkstemps.c:60
 @deftypefn Replacement int mkstemps (char *@var{pattern}, int @var{suffix_len})
 
 Generate a unique temporary file name from @var{pattern}.
@@ -1204,7 +1203,7 @@ deprecated in new programs in favor of @code{strrchr}.
 
 @end deftypefn
 
-@c setenv.c:23
+@c setenv.c:22
 @deftypefn Supplemental int setenv (const char *@var{name}, @
   const char *@var{value}, int @var{overwrite})
 @deftypefnx Supplemental void unsetenv (const char *@var{name})
@@ -1478,7 +1477,7 @@ valid until at least the next call.
 
 @end deftypefn
 
-@c splay-tree.c:303
+@c splay-tree.c:305
 @deftypefn Supplemental splay_tree splay_tree_new_with_typed_alloc @
 (splay_tree_compare_fn @var{compare_fn}, @
 splay_tree_delete_key_fn @var{delete_key_fn}, @
@@ -1495,7 +1494,11 @@ different types need to be allocated with different allocators.
 
 The splay tree will use @var{compare_fn} to compare nodes,
 @var{delete_key_fn} to deallocate keys, and @var{delete_value_fn} to
-deallocate values.
+deallocate values.  Keys and values will be deallocated when the
+tree is deleted using splay_tree_delete or when a node is removed
+using splay_tree_remove.  splay_tree_insert will release the previously
+inserted key and value using @var{delete_key_fn} and @var{delete_value_fn}
+if the inserted key is already found in the tree.
 
 @end deftypefn
 
@@ -1549,7 +1552,7 @@ Returns a pointer to a copy of @var{s} in memory obtained from
 
 @end deftypefn
 
-@c strerror.c:670
+@c strerror.c:675
 @deftypefn Replacement {const char*} strerrno (int @var{errnum})
 
 Given an error number returned from a system call (typically returned
@@ -1569,7 +1572,7 @@ valid until the next call to @code{strerrno}.
 
 @end deftypefn
 
-@c strerror.c:603
+@c strerror.c:608
 @deftypefn Supplemental char* strerror (int @var{errnoval})
 
 Maps an @code{errno} number to an error message string, the contents
@@ -1698,7 +1701,7 @@ the location referenced by @var{endptr}.
 
 @end deftypefn
 
-@c strerror.c:729
+@c strerror.c:734
 @deftypefn Extension int strtoerrno (const char *@var{name})
 
 Given the symbolic name of a error number (e.g., @code{EACCES}), map it
@@ -1914,7 +1917,7 @@ does the return value.  The third argument is unused in @libib{}.
 
 @end deftypefn
 
-@c argv.c:286
+@c argv.c:289
 @deftypefn Extension int writeargv (char * const *@var{argv}, FILE *@var{file})
 
 Write each member of ARGV, handling all necessary quoting, to the file
index 880c8787716520d8c80583ceb9c678a8b8dde065..9f917c3571d96a6ebd1e472f85bb85787f715a6c 100644 (file)
@@ -725,7 +725,7 @@ htab_remove_elt_with_hash (htab_t htab, PTR element, hashval_t hash)
   PTR *slot;
 
   slot = htab_find_slot_with_hash (htab, element, hash, NO_INSERT);
-  if (*slot == HTAB_EMPTY_ENTRY)
+  if (slot == NULL)
     return;
 
   if (htab->del_f)
index c1f38cee8ee76704661bf5df67e8fe24509ae872..b00c265128c9dbca6984cea556af010df99f5427 100644 (file)
@@ -44,6 +44,10 @@ Boston, MA 02110-1301, USA.  */
 #define SEEK_SET 0
 #endif
 
+#ifndef O_BINARY
+#define O_BINARY 0
+#endif
+
 #include "simple-object-common.h"
 
 /* The known object file formats.  */
@@ -349,7 +353,7 @@ simple_object_copy_lto_debug_sections (simple_object_read *sobj,
       return errmsg;
     }
 
-  outfd = creat (dest, 00777);
+  outfd = open (dest, O_CREAT|O_WRONLY|O_TRUNC|O_BINARY, 00777);
   if (outfd == -1)
     {
       *err = errno;
index a8a0bd1f7e2c99f19b0f5d7560734331efe792e1..cc7692c1d6951ce7008b59d7f93766777d256547 100644 (file)
@@ -299,7 +299,7 @@ static const struct error_info error_table[] =
   ENTRY(EREMCHG, "EREMCHG", "Remote address changed"),
 #endif
 #if defined (ELIBACC)
-  ENTRY(ELIBACC, "ELIBACC", "Can not access a needed shared library"),
+  ENTRY(ELIBACC, "ELIBACC", "Cannot access a needed shared library"),
 #endif
 #if defined (ELIBBAD)
   ENTRY(ELIBBAD, "ELIBBAD", "Accessing a corrupted shared library"),
This page took 0.037855 seconds and 4 git commands to generate.