Orphaned Response - (nf)

Morris Keesan keesan at bbncca.ARPA
Thu Sep 29 07:15:42 AEST 1983


The C Reference Manual, as published in "The C Programming Language", by
Kernighan and Ritchie, does indeed say (p. 197), "Two structures may share a
common initial sequence of members . . . if . . . the same type in both and if
all previous members are the same in both."
    HOWEVER, the revised C language, as of UNIX* System V, says (p. 92 of
"Programming Guide UNIX* System), "The names of members and tags do not conflict
with each other or with ordinary variables," and the System V "Transition Aids"
says, in "User Level Changes to the C Language", "The C language has been
revised to permit the reuse of structure members or field names," and also
enforces strict type checking with regard to use of structure member names,
including complete qualification of names.
    Given these changes, there is no need within the C language, i.e. in
programs written only in C, for the preservation of the order of structures.
The requirement for that is due to the nature of C as a system programming
language, which must be able to interface with various operating systems, 
system services, and other languages, and must be able to create control



More information about the Comp.lang.c mailing list