C
chinu
mail
hi all..
is it possible to find the size of a structure upto bit size.., where
the structure contains only one element and that too with bit
specifier..eg..
struct x {
char a : 4;
} y;
int main(){
printf("size of struct is %d\n",sizoef(y)); //will give 1
}
is there any way to get the size exactly upto no of bits.. so for the
ex above.. size should be 4..., i can disable ths automatic stuffing by
pragma.. still the smallest granularity for pragma is 1 byte only..
-- i think compiler should be able to tell this thing.., it is just
matter of asking the compiler right thing.. he wh
hi all..
is it possible to find the size of a structure upto bit size.., where
the structure contains only one element and that too with bit
specifier..eg..
struct x {
char a : 4;
} y;
int main(){
printf("size of struct is %d\n",sizoef(y)); //will give 1
}
is there any way to get the size exactly upto no of bits.. so for the
ex above.. size should be 4..., i can disable ths automatic stuffing by
pragma.. still the smallest granularity for pragma is 1 byte only..
-- i think compiler should be able to tell this thing.., it is just
matter of asking the compiler right thing.. he wh