История изменений
Исправление safocl, (текущая версия) :
так в си тоже самое указано — прям почти дословно...
WG14/N1124 Committee Draft — May 6, 2005 ISO/IEC 9899:TC2
6.5.2.3 Structure and union members
Constraints
5 One special guarantee is made in order to simplify the use of unions: if a union contains several structures that share a common initial sequence (see below), and if the union object currently contains one of these structures, it is permitted to inspect the common initial part of any of them anywhere that a declaration of the complete type of the union is visible. Two structures share a common initial sequence if corresponding members have compatible types (and, for bit-fields, the same widths) for a sequence of one or more initial members.
Исправление safocl, :
так в си тоже самое указано — прям почти дословно...
6.5.2.3 Structure and union members
Constraints
5 One special guarantee is made in order to simplify the use of unions: if a union contains several structures that share a common initial sequence (see below), and if the union object currently contains one of these structures, it is permitted to inspect the common initial part of any of them anywhere that a declaration of the complete type of the union is visible. Two structures share a common initial sequence if corresponding members have compatible types (and, for bit-fields, the same widths) for a sequence of one or more initial members.
Исходная версия safocl, :
так в си тоже самое указано — прям почти дословно...