mirror of
https://github.com/tailix/libkernaux.git
synced 2024-11-13 11:04:27 -05:00
25 lines
363 B
C
25 lines
363 B
C
#include <kernaux/macro.h>
|
|
|
|
#include <assert.h>
|
|
#include <stdint.h>
|
|
|
|
struct Foo {
|
|
uint8_t a;
|
|
uint32_t b;
|
|
};
|
|
|
|
#include <kernaux/macro/packing_start.run>
|
|
|
|
struct Bar {
|
|
uint8_t a;
|
|
uint32_t b;
|
|
}
|
|
KERNAUX_PACKED;
|
|
|
|
#include <kernaux/macro/packing_end.run>
|
|
|
|
void example_main()
|
|
{
|
|
assert(sizeof(struct Foo) > 5);
|
|
assert(sizeof(struct Bar) == 5);
|
|
}
|