aboutsummaryrefslogtreecommitdiff
path: root/gcc/system.h
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/system.h')
-rw-r--r--gcc/system.h34
1 files changed, 32 insertions, 2 deletions
diff --git a/gcc/system.h b/gcc/system.h
index 544f7ba..3c543a0 100644
--- a/gcc/system.h
+++ b/gcc/system.h
@@ -235,6 +235,7 @@ extern int errno;
# include <cstring>
# include <new>
# include <utility>
+# include <type_traits>
#endif
/* Some of glibc's string inlines cause warnings. Plus we'd rather
@@ -736,6 +737,27 @@ extern int vsnprintf (char *, size_t, const char *, va_list);
#endif
#endif
+#ifdef INCLUDE_ISL
+#ifdef HAVE_isl
+#include <isl/options.h>
+#include <isl/ctx.h>
+#include <isl/val.h>
+#include <isl/set.h>
+#include <isl/union_set.h>
+#include <isl/map.h>
+#include <isl/union_map.h>
+#include <isl/aff.h>
+#include <isl/constraint.h>
+#include <isl/flow.h>
+#include <isl/ilp.h>
+#include <isl/schedule.h>
+#include <isl/ast_build.h>
+#include <isl/schedule_node.h>
+#include <isl/id.h>
+#include <isl/space.h>
+#endif
+#endif
+
/* Redefine abort to report an internal error w/o coredump, and
reporting the location of the error in the source file. */
extern void fancy_abort (const char *, int, const char *)
@@ -866,12 +888,10 @@ extern void fancy_abort (const char *, int, const char *)
etc don't spuriously fail. */
#ifdef IN_GCC
-#ifndef USES_ISL
#undef calloc
#undef strdup
#undef strndup
#pragma GCC poison calloc strdup strndup
-#endif
#if !defined(FLEX_SCANNER) && !defined(YYBISON)
#undef malloc
@@ -1244,4 +1264,14 @@ void gcc_stablesort (void *, size_t, size_t,
of the number. */
#define PRsa(n) "%" #n PRIu64 "%c"
+/* System headers may define NULL to be an integer (e.g. 0L), which cannot be
+ used safely in certain contexts (e.g. as sentinels). Redefine NULL to
+ nullptr in order to make it safer. Note that this might confuse system
+ headers, however, by convention they must not be included after this point.
+*/
+#ifdef __cplusplus
+#undef NULL
+#define NULL nullptr
+#endif
+
#endif /* ! GCC_SYSTEM_H */