]> git.ozlabs.org Git - ccan/blob - ccan/structeq/test/compile_fail-expect-any-padding.c
ccan/structeq: make it safe when there's padding.
[ccan] / ccan / structeq / test / compile_fail-expect-any-padding.c
1 #include <ccan/structeq/structeq.h>
2
3 struct mydata {
4         int start, end;
5 };
6 #ifdef FAIL
7 #define PADDING -1
8 #else
9 #define PADDING 0
10 #endif
11
12 STRUCTEQ_DEF(mydata, PADDING, start, end);
13
14 int main(void)
15 {
16         struct mydata a = { 0, 100 };
17
18         return mydata_eq(&a, &a);
19 }