summaryrefslogtreecommitdiff
path: root/ext/-test-/RUBY_ALIGNOF/c.c
diff options
context:
space:
mode:
Diffstat (limited to 'ext/-test-/RUBY_ALIGNOF/c.c')
-rw-r--r--ext/-test-/RUBY_ALIGNOF/c.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/ext/-test-/RUBY_ALIGNOF/c.c b/ext/-test-/RUBY_ALIGNOF/c.c
new file mode 100644
index 0000000000..2ff23e1dfd
--- /dev/null
+++ b/ext/-test-/RUBY_ALIGNOF/c.c
@@ -0,0 +1,9 @@
+#include "ruby.h"
+#include <stddef.h>
+
+struct T {
+ char _;
+ double t;
+};
+
+RBIMPL_STATIC_ASSERT(RUBY_ALIGNOF, RUBY_ALIGNOF(double) == offsetof(struct T, t));