Orphaned Response - (nf)

tll at druxu.UUCP tll at druxu.UUCP
Sun Sep 11 10:20:27 AEST 1983

The order of structure members is NOT arbitrary.  The compiler must
retain the order you specified.

	"Within a structure, the objects declared have addresses which
	increase as their declarations are read left-to-right."
				(C Reference Manual, p. 196)

	"Two structures may share a common initial sequence of
	members; that is, the same member may appear in two
	different structures if it has the same type in both
	and if all previous members are the same in both."
				(C Reference Manual, p. 197)

This feature is used by many programs, and I don't think that
closing the holes in a structure is worth removing this feature.

Since compilers are not supposed to support == on structures, why
doesn't a compiler give an error when you try instead of generating
buggy code?

				Tom Laidig
				AT&T Information Systems
					Laboratories, Denver

More information about the Comp.lang.c mailing list