summaryrefslogtreecommitdiff
path: root/ext/-test-/RUBY_ALIGNOF/c.c
blob: 5768b8c3ddfce7ff4b43b93c4a58101e577131c6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#include "ruby.h"
#include <stddef.h>

struct T {
    char _;
    double t;
};

RBIMPL_STATIC_ASSERT(RUBY_ALIGNOF, RUBY_ALIGNOF(double) == offsetof(struct T, t));

void
Init_RUBY_ALIGNOF()
{
    // Windows linker mandates this symbol to exist.
}