|
|
|
|
|
by rwmj
1514 days ago
|
|
This is what qemu uses: #define QEMU_BUILD_BUG_ON(x) \
typedef char qemu_build_bug_on[(x)?-1:1] __attribute__((unused));
So you can write stuff like: QEMU_BUILD_BUG_ON(sizeof (struct foo) == 128);
(for example if the struct is used for some network protocol and so it must be 128 bytes long). |
|