Skip to content

Commit fa79612

Browse files
committed
Delete alignof check
1 parent b90dde3 commit fa79612

1 file changed

Lines changed: 2 additions & 3 deletions

File tree

tests/unit/union_field_alignment.c

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@
33
#include <stddef.h>
44
#include <stdint.h>
55

6+
// Just check if this compiles. node::x::aligner is used to impose a specific
7+
// alignment on the bytes field.
68
struct node {
79
struct node *next;
810
union {
@@ -15,9 +17,6 @@ int main(void) {
1517
struct node n;
1618
n.next = 0;
1719
n.x.bytes[0] = 0xAB;
18-
1920
assert(n.x.bytes[0] == 0xAB);
20-
assert(sizeof(n.x) >= sizeof(void *));
21-
assert(((uintptr_t)&n.x % _Alignof(void *)) == 0);
2221
return 0;
2322
}

0 commit comments

Comments
 (0)