Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR C

c disable struct padding

// sizeof(x) == 8
struct x
{
    char x;
    int a;
};

// sizeof(y) == 5
struct y
{
    char x;
    int a;
} __attribute__((packed));
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #disable #struct #padding
ADD COMMENT
Topic
Name
9+2 =