sim: ppc: replace local __attribute__ fallback

Message ID 20210616051459.28381-1-vapier@gentoo.org
State New
Headers show
Series
  • sim: ppc: replace local __attribute__ fallback
Related show

Commit Message

Eli Zaretskii via Gdb-patches June 16, 2021, 5:14 a.m.
The common ansidecl.h provides fallbacks for these so we don't need to.
---
 sim/ppc/ChangeLog | 6 ++++++
 sim/ppc/basics.h  | 9 ---------
 sim/ppc/misc.h    | 7 +------
 3 files changed, 7 insertions(+), 15 deletions(-)

-- 
2.31.1

Patch

diff --git a/sim/ppc/ChangeLog b/sim/ppc/ChangeLog
index fd3a0c81eca2..723dc11fd460 100644
--- a/sim/ppc/ChangeLog
+++ b/sim/ppc/ChangeLog
@@ -1,3 +1,9 @@ 
+2021-06-16  Mike Frysinger  <vapier@gentoo.org>
+
+	* basics.h (__attribute__): Delete.
+	* misc.h (__attribute__): Likewise.
+	Include ansidecl.h.
+
 2021-06-16  Mike Frysinger  <vapier@gentoo.org>
 
 	* cpu.h: Include ansidecl.h.
diff --git a/sim/ppc/basics.h b/sim/ppc/basics.h
index 7b785b21f0c9..0d03a42d8b75 100644
--- a/sim/ppc/basics.h
+++ b/sim/ppc/basics.h
@@ -83,15 +83,6 @@  typedef enum {
 #include <stdlib.h>
 
 
-#if !defined (__attribute__)
-#if (!defined(__GNUC__) \
-     || (__GNUC__ < 2) \
-     || (__GNUC__ == 2 && __GNUC_MINOR__ < 6))
-#define __attribute__(arg)
-#endif
-#endif
-
-
 /* Basic definitions - ordered so that nothing calls what comes after
    it */
 
diff --git a/sim/ppc/misc.h b/sim/ppc/misc.h
index c080ae29f0b4..95b07390a0f4 100644
--- a/sim/ppc/misc.h
+++ b/sim/ppc/misc.h
@@ -27,12 +27,7 @@ 
 #include <string.h>
 #include <stdlib.h>
 
-#if !defined (__attribute__) && (!defined(__GNUC__) || __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 7))
-#define __attribute__(arg)
-#endif
-
-
-
+#include "ansidecl.h"
 #include "filter_filename.h"
 
 extern void error