aboutsummaryrefslogtreecommitdiff
path: root/gcc/cexp.y
diff options
context:
space:
mode:
authorTom Wood <wood@gnu.org>1992-08-14 22:52:00 +0000
committerTom Wood <wood@gnu.org>1992-08-14 22:52:00 +0000
commitd6927cc9589c923b7d5be294bcc8ea9280badc5a (patch)
treed7a88732563a5ba24b97703058853c094eaf8cdc /gcc/cexp.y
parent5856c581baeaeef59ecefba059f53fe83abdc6bd (diff)
downloadgcc-d6927cc9589c923b7d5be294bcc8ea9280badc5a.zip
gcc-d6927cc9589c923b7d5be294bcc8ea9280badc5a.tar.gz
gcc-d6927cc9589c923b7d5be294bcc8ea9280badc5a.tar.bz2
(NULL_PTR): Use the same definition as
rtl.h and tree.h. From-SVN: r1847
Diffstat (limited to 'gcc/cexp.y')
-rw-r--r--gcc/cexp.y12
1 files changed, 11 insertions, 1 deletions
diff --git a/gcc/cexp.y b/gcc/cexp.y
index 6dcbecd..8f500e9 100644
--- a/gcc/cexp.y
+++ b/gcc/cexp.y
@@ -45,12 +45,22 @@ struct arglist {
int argno;
};
+/* Define a generic NULL if one hasn't already been defined. */
+
#ifndef NULL
#define NULL 0
#endif
+#ifndef GENERIC_PTR
+#if defined (USE_PROTOTYPES) ? USE_PROTOTYPES : defined (__STDC__)
+#define GENERIC_PTR void *
+#else
+#define GENERIC_PTR char *
+#endif
+#endif
+
#ifndef NULL_PTR
-#define NULL_PTR (char *) NULL
+#define NULL_PTR ((GENERIC_PTR)0)
#endif
int yylex ();