aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorDJ Delorie <dj@redhat.com>2001-04-04 01:16:27 +0000
committerDJ Delorie <dj@redhat.com>2001-04-04 01:16:27 +0000
commitd9697354487c09683dd0b1265cf6f8b3fd523a71 (patch)
tree1ffeabe7d37053353cb4bff2338f172d4e7be96e /include
parent391a809a0af96de6bc93f3608c738b9eb597f861 (diff)
downloadgdb-d9697354487c09683dd0b1265cf6f8b3fd523a71.zip
gdb-d9697354487c09683dd0b1265cf6f8b3fd523a71.tar.gz
gdb-d9697354487c09683dd0b1265cf6f8b3fd523a71.tar.bz2
merge from gcc
Diffstat (limited to 'include')
-rw-r--r--include/ChangeLog4
-rw-r--r--include/ansidecl.h28
2 files changed, 32 insertions, 0 deletions
diff --git a/include/ChangeLog b/include/ChangeLog
index 550af2e..3a37d1a 100644
--- a/include/ChangeLog
+++ b/include/ChangeLog
@@ -1,3 +1,7 @@
+2001-04-03 Zack Weinberg <zackw@stanford.edu>
+
+ * ansidecl.h: All logic from gcc/gansidecl.h moved here.
+
2001-03-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* libiberty.h (alloca): Handle setting C_ALLOCA.
diff --git a/include/ansidecl.h b/include/ansidecl.h
index 545a621..88187be 100644
--- a/include/ansidecl.h
+++ b/include/ansidecl.h
@@ -161,6 +161,15 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#endif /* ANSI C. */
+/* This is for GCC, which has historically used typed null pointer
+ constants. It needs to be here so it is seen by headers included
+ by gcc's config.h.
+
+ FIXME: GCC probably doesn't need to use typed nulls anymore.
+ Clean it up, then remove this. Ware variable-argument functions. */
+#ifdef IN_GCC
+# define NULL_PTR ((PTR) 0)
+#endif
/* Using MACRO(x,y) in cpp #if conditionals does not work with some
older preprocessors. Thus we can't define something like this:
@@ -230,4 +239,23 @@ So instead we use the macro below and test it against specific values. */
#define __extension__
#endif
+/* Bootstrap support: Autoconf will possibly define the `inline' or
+ `const' keywords as macros, however this is only valid for the
+ stage1 compiler. If we detect a modern version of gcc,
+ unconditionally reset the values. This makes sure the right thing
+ happens in stage2 and later. We need to do this very early;
+ i.e. before any header files that might use these keywords.
+ Otherwise conflicts might occur. */
+
+#if (GCC_VERSION >= 2007)
+# ifdef __STDC__
+# undef const
+# endif
+# undef inline
+# define inline __inline__ /* __inline__ prevents -pedantic warnings */
+# ifndef HAVE_LONG_DOUBLE
+# define HAVE_LONG_DOUBLE 1
+# endif
+#endif /* GCC >= 2.7 */
+
#endif /* ansidecl.h */