The New C Standard- P13

Tham khảo tài liệu 'the new c standard- p13', công nghệ thông tin, kỹ thuật lập trình phục vụ nhu cầu học tập, nghiên cứu và làm việc hiệu quả | Structure and union specifiers 1401 Commentary This wording specifies that the form struct-or-union identifieropt struct-declaration-list declares a new type. Other forms of structure declaration that omit the braces either declare an identifier as a tag or refer to a previous declaration. Other Languages Whether or not a structure or union type definition is a new type may depend on a languages type compatibility rules. Languages that use structural equivalence may treat different definitions as being the same type usually I - 1 1 1 633 COmpatible employing rules similar to those used by C for type compatibility across translation units . separatetransla- tion units 1400 The struct-declaration-list is a sequence of declarations for the members of the structure or union. Commentary Say in words what is specified in the syntax. 1401 If the struct-declaration-list contains no named members the behavior is undefined. Commentary The syntax does not permit the struct-declaration-list to be empty. However it is possible for mAT nl AT c trr nnncjmAfl Int frAlrlc 1414 bit-field members to be unnamed bit-fields. unnamed C An object of a class consists of a possibly empty sequence of members and base class objects. Source developed using a C translator may contain class types having no members. This usage will result in undefined behavior when processed by a C translator. Other Languages The syntax of languages invariably requires at least one member to be declared and do not permit zero sized types to be defined. Common Implementations Most implementations issue a diagnostic when they encounter a struct-declaration-list that does not contain any named members. However many implementations also implicitly assume that all declared objects have a nonzero size and after issuing the diagnostic may behave unpredictably when this assumption is not met. Coding Guidelines This construct did not occur in the source code used for this book s code measurements and in practice .

Không thể tạo bản xem trước, hãy bấm tải xuống
Đã phát hiện trình chặn quảng cáo AdBlock
Trang web này phụ thuộc vào doanh thu từ số lần hiển thị quảng cáo để tồn tại. Vui lòng tắt trình chặn quảng cáo của bạn hoặc tạm dừng tính năng chặn quảng cáo cho trang web này.