summaryrefslogtreecommitdiff
path: root/libguile/__scm.h
diff options
context:
space:
mode:
authorAndy Wingo <wingo@pobox.com>2011-09-15 12:28:03 -0700
committerAndy Wingo <wingo@pobox.com>2011-09-15 12:28:03 -0700
commit75917d62434b103a89fc65bde66a1a3e97b598a1 (patch)
tree2fe0985637a7e95708d2d9aa2097160432e100eb /libguile/__scm.h
parent8b66aa8f5496a515ca133d6d2c37a06f6ec1720d (diff)
downloadguile-75917d62434b103a89fc65bde66a1a3e97b598a1.tar.gz
Revert "SCM is either a union or scm_t_bits"
This reverts commit 80125469ef95f6d8d46a26619fb2f85151f32719. Conflicts: libguile/__scm.h
Diffstat (limited to 'libguile/__scm.h')
-rw-r--r--libguile/__scm.h25
1 files changed, 25 insertions, 0 deletions
diff --git a/libguile/__scm.h b/libguile/__scm.h
index 3a8b07a6f..ee73855c6 100644
--- a/libguile/__scm.h
+++ b/libguile/__scm.h
@@ -273,6 +273,31 @@
#define SCM_DEBUG_REST_ARGUMENT SCM_DEBUG
#endif
+/* The macro SCM_DEBUG_TYPING_STRICTNESS indicates what level of type checking
+ * shall be performed with respect to the use of the SCM datatype. The macro
+ * may be defined to one of the values 0, 1 and 2.
+ *
+ * A value of 0 means that there will be no compile time type checking, since
+ * the SCM datatype will be declared as an integral type. This setting should
+ * only be used on systems, where casting from integral types to pointers may
+ * lead to loss of bit information.
+ *
+ * A value of 1 means that there will an intermediate level of compile time
+ * type checking, since the SCM datatype will be declared as a pointer to an
+ * undefined struct. This setting is the default, since it does not cost
+ * anything in terms of performance or code size.
+ *
+ * A value of 2 provides a maximum level of compile time type checking since
+ * the SCM datatype will be declared as a struct. This setting should be used
+ * for _compile time_ type checking only, since the compiled result is likely
+ * to be quite inefficient. The right way to make use of this option is to do
+ * a 'make clean; make CFLAGS=-DSCM_DEBUG_TYPING_STRICTNESS=2', fix your
+ * errors, and then do 'make clean; make'.
+ */
+#ifndef SCM_DEBUG_TYPING_STRICTNESS
+#define SCM_DEBUG_TYPING_STRICTNESS 1
+#endif
+
/* {Feature Options}