As long as you gain access only to the first element of the structure, it is considered safe, since there is no spacer in front of the first element of the structure. In fact, this trick is used, for example, in the Objecive-C runtime, where the generic pointer type is defined as:
typedef struct objc_object { Class isa; } *id;
and at runtime, real objects (which still remain hidden pointers to a structure) have memory layouts like this:
struct { Class isa; int x;
and the runtime accesses the class of the real object using this method.
user529758
source share