This is the mail archive of the gdb-patches@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[commit] Define multi-arch macros when not defined


Hello,

gdbarch.h contains a number of occurances of:

#if defined (foo) && multi-arch > partial
#error
#endif
#if !defined (foo) || multi-arch > partial
#define foo ...
#endif

the multi-arch check wrapping #error makes the latter multi-arch check wrapping the #define redundant.

This deletes that second check, committed.
Andrew
Index: ChangeLog
2004-06-13  Andrew Cagney  <cagney@gnu.org>

	* gdbarch.sh: For predicates, do not check GDB_MULTI_ARCH when
	defining any macros.
	* gdbarch.h: Re-generate.

Index: gdbarch.sh
===================================================================
RCS file: /cvs/src/src/gdb/gdbarch.sh,v
retrieving revision 1.324
diff -p -u -r1.324 gdbarch.sh
--- gdbarch.sh	13 Jun 2004 16:43:58 -0000	1.324
+++ gdbarch.sh	13 Jun 2004 16:58:03 -0000
@@ -877,7 +877,7 @@ do
 	    printf "#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (${macro}_P)\n"
 	    printf "#error \"Non multi-arch definition of ${macro}\"\n"
 	    printf "#endif\n"
-	    printf "#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (${macro}_P)\n"
+	    printf "#if !defined (${macro}_P)\n"
 	    printf "#define ${macro}_P() (gdbarch_${function}_p (current_gdbarch))\n"
 	    printf "#endif\n"
 	fi

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]