[binutils-gdb] sim: ppc: replace local __attribute__ fallback

Michael Frysinger vapier@sourceware.org
Wed Jun 16 05:15:29 GMT 2021


https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=1b828ebe530ef113c9e55fad8f7e472cd36dd078

commit 1b828ebe530ef113c9e55fad8f7e472cd36dd078
Author: Mike Frysinger <vapier@gentoo.org>
Date:   Tue Jun 15 20:50:16 2021 -0400

    sim: ppc: replace local __attribute__ fallback
    
    The common ansidecl.h provides fallbacks for these so we don't need to.

Diff:
---
 sim/ppc/ChangeLog | 6 ++++++
 sim/ppc/basics.h  | 9 ---------
 sim/ppc/misc.h    | 7 +------
 3 files changed, 7 insertions(+), 15 deletions(-)

diff --git a/sim/ppc/ChangeLog b/sim/ppc/ChangeLog
index fd3a0c81eca..723dc11fd46 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 7b785b21f0c..0d03a42d8b7 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 c080ae29f0b..95b07390a0f 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


More information about the Gdb-cvs mailing list