Useful macro...or dangerous??
gordan
gordan at maccs.UUCP
Sun May 1 00:53:38 AEST 1988
In article <221 at raunvis.UUCP> kjartan at raunvis.UUCP (Kjartan Pier Emilsson Jardedlisfraedi) writes:
-
- [Is it a good idea to test for equality of structures by doing a
- byte-by-byte comparison for sizeof(struct xxx) bytes?]
"Because certain data objects may be constrained by the target computer
to lie on certain addressing boundaries, a structure object may contain
"holes," storage units that do not belong to any component of the
structure. The holes would make equality tests implemented as a
wholesale bit-by-bit comparison unreliable..."
-- Harbison & Steele, 2nd. ed., p. 103
--
Gordan Palameta
uunet!mnetor!maccs!gordan
More information about the Comp.lang.c
mailing list