1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00
RIOT/tests/build_system/xfa/xfatest2.c
Marian Buschsieweke 2b6f65a08a
build_system/xfa: change API to fix alignment
This changes the API of xfa from

    XFA(array_name, prio) type element_name = INITIALIZER;

to

    XFA(type, array_name, prio) element_name = INITIALIZER;

this allows forcing natural alignment of the type, fixing failing tests
on `native64`.
2024-11-07 16:30:01 +01:00

11 lines
643 B
C

#include "xfa.h"
#include "xfatest.h"
XFA(xfatest_t, xfatest, 1) _xfatest2 = { .val = 2, .text = "xfatest2", .letter = 'b' };
XFA(xfatest_t, xfatest, 3) _xfatest4 = { .val = 4, .text = "xfatest4", .letter = 'd' };
XFA(xfatest_t, xfatest, 2) _xfatest3 = { .val = 3, .text = "xfatest3", .letter = 'c' };
XFA_CONST(xfatest_t, xfatest_const, 1) _xfatest_const2 = { .val = 45, .text = "xfatest_const2", .letter = 'b' };
XFA_CONST(xfatest_t, xfatest_const, 3) _xfatest_const4 = { .val = 44, .text = "xfatest_const4", .letter = 'd' };
XFA_CONST(xfatest_t, xfatest_const, 2) _xfatest_const3 = { .val = 42, .text = "xfatest_const3", .letter = 'c' };