aboutsummaryrefslogtreecommitdiffstats
path: root/runtime/include
diff options
context:
space:
mode:
authorBernhard Schommer <bschommer@users.noreply.github.com>2018-05-24 19:11:08 +0200
committerXavier Leroy <xavierleroy@users.noreply.github.com>2018-05-24 19:11:08 +0200
commitca26f4513b62f94c13a1bbc487014e306a5a8ebe (patch)
tree42053d58e41a33e934346a53c715f25166cd23f9 /runtime/include
parent93a0d21e67d2f8fe978bffec7d7036e866b44f04 (diff)
downloadcompcert-kvx-ca26f4513b62f94c13a1bbc487014e306a5a8ebe.tar.gz
compcert-kvx-ca26f4513b62f94c13a1bbc487014e306a5a8ebe.zip
Define the C11 type max_align_t (#115)
The definition is similar to that of gcc, however since we don't support long doubles out of the box and long doubles are doubles in compat mode we can directly define max_align_t to be long long. Bug 23380
Diffstat (limited to 'runtime/include')
-rw-r--r--runtime/include/stddef.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/runtime/include/stddef.h b/runtime/include/stddef.h
index 452497c3..6056db62 100644
--- a/runtime/include/stddef.h
+++ b/runtime/include/stddef.h
@@ -117,4 +117,13 @@ typedef signed int wchar_t;
#define offsetof(ty,member) (__builtin_offsetof(ty,member))
#endif
+#ifdef _STDDEF_H
+/* Type whose alignment is supported in every context and is at least
+ as great as that of any standard type not using alignment
+ specifiers. Since we do not support long double per default the type
+ with the maximum alignment supported in every context is long long.
+*/
+typedef long long max_align_t;
+#endif
+
#endif