LINUX.ORG.RU

История изменений

Исправление byko3y, (текущая версия) :

C11, 6.5. Expression.
«An object shall have its stored value accessed only by an lvalue expression that has one of the following types:
— a type compatible with the effective type of the object,
— a qualified version of a type compatible with the effective type of the object,
— a type that is the signed or unsigned type corresponding to the effective type of theo bject,
— a type that is the signed or unsigned type corresponding to a qualified version of the effective type of the object,
— an aggregate or union type that includes one of the aforementioned types among its members (including, recursively, a member of a subaggregate or contained union), or
— a character type.
foo f;
foobar( &f, &f.x );
— a character type.»

А также, 6.3.2.3 Pointers.
«A pointer to an object type may be converted to a pointer to a different object type. If the resulting pointer is not correctly aligned for the referenced type, the behavior is undefined.»

Исходная версия byko3y, :

C11, 6.5. Expression.
«An object shall have its stored value accessed only by an lvalue expression that has one of the following types:)
— a type compatible with the effective type of the object,
— a qualified version of a type compatible with the effective type of the object,
— a type that is the signed or unsigned type corresponding to the effective type of theobject,
— a type that is the signed or unsigned type corresponding to a qualified version of theeffective type of the object,
— an aggregate or union type that includes one of the aforementioned types among itsmembers (including, recursively, a member of a subaggregate or contained union), or
— a character type.
foo f;
foobar( &f, &f.x );
— a character type.»

А также, 6.3.2.3 Pointers.
«A pointer to an object type may be converted to a pointer to a different object type. If the resulting pointer is not correctly aligned for the referenced type, the behavior is undefined.»