summaryrefslogtreecommitdiff
path: root/src/include
diff options
context:
space:
mode:
Diffstat (limited to 'src/include')
-rw-r--r--src/include/stddef.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/include/stddef.h b/src/include/stddef.h
index b58f645a3b..35326ed6c6 100644
--- a/src/include/stddef.h
+++ b/src/include/stddef.h
@@ -34,4 +34,12 @@ typedef unsigned int wint_t;
#define MAYBE_STATIC static
#endif
+#ifndef __ROMCC__
+/* Provide a pointer to address 0 that thwarts any "accessing this is
+ * undefined behaviour and do whatever" trickery in compilers.
+ * Use when you _really_ need to read32(zeroptr) (ie. read address 0).
+ */
+extern void *zeroptr;
+#endif
+
#endif /* STDDEF_H */