According to the C++ standard: The order of allocation of non-static data members with different access control is unspecified.
and using operator offsetof do produce a warning under gcc when I have data members with different access control.
out of curiosity: why would a compiler do that ?