G
George Orwell
Peter said:int padded = sizeof (struct abc);
int unpadded = pp_struct_abc(pp_as_type_size, +);
printf(" padded: %d bytes\n", padded);
printf("unpadded: %d bytes\n", unpadded);
printf(" padding: %d bytes\n", padded - unpadded);
Please fix your code.
The sizeof operator returns a size_t.
You've been on this newsgroup for many years, so surely
you're aware by now of the *grave* importance that
Keith Thompson & Co. place on proper sizeof typing. Or
is it important for only newcomers to the group, and not
the clique's foot soldiers?
Only the other day, in the thread "size of a struct without
'sizeof'", Keith Thompson & Co. reminded us that, even though
the structure presented by a poster had very few members,
there could be problems because, I quote:
"... but even this will fail if the struct's size is greater
than INT_MAX, which could be as low as 32767. It would be
better to use a `size_t' variable."
-- Eric Sosman
"It's possible (if unlikely) that sizeof(struct whatever)
could exceed INT_MAX."
-- Keith Thompson
You've been warned, Peter! Now get fixing!
Yours,
Han from China
Il mittente di questo messaggio|The sender address of this
non corrisponde ad un utente |message is not related to a real
reale ma all'indirizzo fittizio|person but to a fake address of an
di un sistema anonimizzatore |anonymous system
Per maggiori informazioni |For more info
https://www.mixmaster.it