This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
[committed, PATCH] Sync header files with GCC
- From: "H.J. Lu" <hongjiu dot lu at intel dot com>
- To: binutils at sourceware dot org
- Date: Tue, 14 Jul 2015 09:21:19 -0700
- Subject: [committed, PATCH] Sync header files with GCC
- Authentication-results: sourceware.org; auth=none
- Reply-to: "H.J. Lu" <hjl dot tools at gmail dot com>
diff --git a/include/ChangeLog b/include/ChangeLog
index cd83b28..9fc5469 100644
--- a/include/ChangeLog
+++ b/include/ChangeLog
@@ -1,3 +1,25 @@
+2015-07-14 H.J. Lu <hongjiu.lu@intel.com>
+
+ Sync with GCC
+ 2014-10-28 Richard Henderson <rth@redhat.com>
+
+ * longlong.h [__alpha] (umul_ppmm): Disable for c++.
+
+2015-07-14 H.J. Lu <hongjiu.lu@intel.com>
+
+ Sync with GCC
+ 2014-12-09 Trevor Saunders <tsaunders@mozilla.com>
+
+ * hashtab.h, splay-tree.h: Remove GTY markers.
+
+2015-07-14 H.J. Lu <hongjiu.lu@intel.com>
+
+ Sync with GCC
+ 2015-03-02 Markus Trippelsdorf <markus@trippelsdorf.de>
+
+ PR target/65261
+ * ansidecl.h (ATTRIBUTE_NO_SANITIZE_UNDEFINED): New macro.
+
2015-07-09 Catherine Moore <clm@codesourcery.com>
* elf/mips/mips.h (Val_GNU_MIPS_ABI_FP_NAN2008): New.
diff --git a/include/ansidecl.h b/include/ansidecl.h
index 6cbea97..224627d 100644
--- a/include/ansidecl.h
+++ b/include/ansidecl.h
@@ -274,6 +274,15 @@ So instead we use the macro below and test it against specific values. */
# endif /* GNUC >= 4.3 */
#endif /* ATTRIBUTE_HOT */
+/* Attribute 'no_sanitize_undefined' was valid as of gcc 4.9. */
+#ifndef ATTRIBUTE_NO_SANITIZE_UNDEFINED
+# if (GCC_VERSION >= 4009)
+# define ATTRIBUTE_NO_SANITIZE_UNDEFINED __attribute__ ((no_sanitize_undefined))
+# else
+# define ATTRIBUTE_NO_SANITIZE_UNDEFINED
+# endif /* GNUC >= 4.9 */
+#endif /* ATTRIBUTE_NO_SANITIZE_UNDEFINED */
+
/* We use __extension__ in some places to suppress -pedantic warnings
about GCC extensions. This feature didn't work properly before
gcc 2.8. */
diff --git a/include/demangle.h b/include/demangle.h
index 9e61d3c..e415de0 100644
--- a/include/demangle.h
+++ b/include/demangle.h
@@ -1,6 +1,6 @@
/* Defs for interface to demanglers.
Copyright (C) 1992-2015 Free Software Foundation, Inc.
-
+
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public License
as published by the Free Software Foundation; either version 2, or
@@ -143,10 +143,10 @@ cplus_mangle_opname (const char *opname, int options);
extern void
set_cplus_marker_for_demangling (int ch);
-extern enum demangling_styles
+extern enum demangling_styles
cplus_demangle_set_style (enum demangling_styles style);
-extern enum demangling_styles
+extern enum demangling_styles
cplus_demangle_name_to_style (const char *name);
/* Callback typedef for allocation-less demangler interfaces. */
diff --git a/include/hashtab.h b/include/hashtab.h
index 10d19bb..b1b5877 100644
--- a/include/hashtab.h
+++ b/include/hashtab.h
@@ -38,10 +38,6 @@ extern "C" {
#include "ansidecl.h"
-#ifndef GTY
-#define GTY(X)
-#endif
-
/* The type for a hash code. */
typedef unsigned int hashval_t;
@@ -96,7 +92,7 @@ typedef void (*htab_free_with_arg) (void *, void *);
functions mentioned below. The size of this structure is subject to
change. */
-struct GTY(()) htab {
+struct htab {
/* Pointer to hash function. */
htab_hash hash_f;
@@ -107,7 +103,7 @@ struct GTY(()) htab {
htab_del del_f;
/* Table itself. */
- void ** GTY ((use_param, length ("%h.size"))) entries;
+ void **entries;
/* Current size (in entries) of the hash table. */
size_t size;
@@ -131,7 +127,7 @@ struct GTY(()) htab {
htab_free free_f;
/* Alternate allocate/free functions, which take an extra argument. */
- void * GTY((skip)) alloc_arg;
+ void *alloc_arg;
htab_alloc_with_arg alloc_with_arg_f;
htab_free_with_arg free_with_arg_f;
diff --git a/include/longlong.h b/include/longlong.h
index 4f2c4f5..a0b2ce1 100644
--- a/include/longlong.h
+++ b/include/longlong.h
@@ -139,6 +139,9 @@ extern const UQItype __clz_tab[256] attribute_hidden;
#endif /* __aarch64__ */
#if defined (__alpha) && W_TYPE_SIZE == 64
+/* There is a bug in g++ before version 5 that
+ errors on __builtin_alpha_umulh. */
+#if !defined(__cplusplus) || __GNUC__ >= 5
#define umul_ppmm(ph, pl, m0, m1) \
do { \
UDItype __m0 = (m0), __m1 = (m1); \
@@ -146,6 +149,7 @@ extern const UQItype __clz_tab[256] attribute_hidden;
(pl) = __m0 * __m1; \
} while (0)
#define UMUL_TIME 46
+#endif /* !c++ */
#ifndef LONGLONG_STANDALONE
#define udiv_qrnnd(q, r, n1, n0, d) \
do { UDItype __r; \
diff --git a/include/splay-tree.h b/include/splay-tree.h
index 159ea80..f71d7d7 100644
--- a/include/splay-tree.h
+++ b/include/splay-tree.h
@@ -43,10 +43,6 @@ extern "C" {
#include <inttypes.h>
#endif
-#ifndef GTY
-#define GTY(X)
-#endif
-
/* Use typedefs for the key and data types to facilitate changing
these types, if necessary. These types should be sufficiently wide
that any pointer or scalar can be cast to these types, and then
@@ -85,22 +81,22 @@ typedef void *(*splay_tree_allocate_fn) (int, void *);
typedef void (*splay_tree_deallocate_fn) (void *, void *);
/* The nodes in the splay tree. */
-struct GTY(()) splay_tree_node_s {
+struct splay_tree_node_s {
/* The key. */
- splay_tree_key GTY ((use_param1)) key;
+ splay_tree_key key;
/* The value. */
- splay_tree_value GTY ((use_param2)) value;
+ splay_tree_value value;
/* The left and right children, respectively. */
- splay_tree_node GTY ((use_params)) left;
- splay_tree_node GTY ((use_params)) right;
+ splay_tree_node left;
+ splay_tree_node right;
};
/* The splay tree itself. */
-struct GTY(()) splay_tree_s {
+struct splay_tree_s {
/* The root of the tree. */
- splay_tree_node GTY ((use_params)) root;
+ splay_tree_node root;
/* The comparision function. */
splay_tree_compare_fn comp;
@@ -118,7 +114,7 @@ struct GTY(()) splay_tree_s {
splay_tree_deallocate_fn deallocate;
/* Parameter for allocate/free functions. */
- void * GTY((skip)) allocate_data;
+ void *allocate_data;
};
typedef struct splay_tree_s *splay_tree;