[m-rev.] diff: fix runtime compilation in high-level C grades
Julien Fischer
jfischer at opturion.com
Tue Apr 22 10:43:39 AEST 2014
Only define MR_nondetstack_inclusion_check in low-level C grades.
runtime/mercury_overflow.c:
As above: compiling this function in high-level C grades
will fail since it refers to fields of the MR_Context
structure that do not exist in those grades.
Julien.
diff --git a/runtime/mercury_overflow.c b/runtime/mercury_overflow.c
index 1b4879d..df0ca64 100644
--- a/runtime/mercury_overflow.c
+++ b/runtime/mercury_overflow.c
@@ -13,6 +13,7 @@
#include "mercury_debug.h" /* for MR_print_zone() etc */
#include "mercury_misc.h" /* for MR_fatal_error() */
+#if !defined(MR_HIGHLEVEL_CODE)
void
MR_nondetstack_inclusion_check(MR_Word *maxfr,
const char *error, const char *where)
@@ -43,6 +44,7 @@ MR_nondetstack_inclusion_check(MR_Word *maxfr,
prev_zones = prev_zones->MR_zones_tail;
}
}
+#endif /* !MR_HIGHLEVEL_CODE */
void
MR_fatal_zone_error(MR_OverflowZone ptr_kind,
diff --git a/runtime/mercury_overflow.h b/runtime/mercury_overflow.h
index 1124b55..693b565 100644
--- a/runtime/mercury_overflow.h
+++ b/runtime/mercury_overflow.h
@@ -24,9 +24,10 @@
** its MR_zone_max field if maxfr exceeds it, since the MR_zone_max field
** should always hold the highest address used in the zone so far.
*/
-
+#if !defined(MR_HIGHLEVEL_CODE)
extern void MR_nondetstack_inclusion_check(MR_Word *maxfr,
const char *error, const char *where);
+#endif
typedef enum {
MR_OVERFLOW_ZONE_DETSTACK,
More information about the reviews
mailing list