X-Git-Url: http://git.ozlabs.org/?a=blobdiff_plain;f=ccan%2Fstructeq%2Ftest%2Fcompile_fail-expect-any-padding.c;fp=ccan%2Fstructeq%2Ftest%2Fcompile_fail-expect-any-padding.c;h=321aef3a3f4413063c63957c1492da24173acce0;hb=92be2eff52133138e4975308f6e731c46b53ace1;hp=0000000000000000000000000000000000000000;hpb=ac8694de3ef34483ce02811c1ba45096ee547a5f;p=ccan diff --git a/ccan/structeq/test/compile_fail-expect-any-padding.c b/ccan/structeq/test/compile_fail-expect-any-padding.c new file mode 100644 index 00000000..321aef3a --- /dev/null +++ b/ccan/structeq/test/compile_fail-expect-any-padding.c @@ -0,0 +1,19 @@ +#include + +struct mydata { + int start, end; +}; +#ifdef FAIL +#define PADDING -1 +#else +#define PADDING 0 +#endif + +STRUCTEQ_DEF(mydata, PADDING, start, end); + +int main(void) +{ + struct mydata a = { 0, 100 }; + + return mydata_eq(&a, &a); +}