struct comparison

Guy Harris guy at auspex.auspex.com
Tue Jul 25 06:02:27 AEST 1989


>> notion of structure comparison would really do what I wanted (e.g., the
>> question of "do you compare pointer values or do you compare the values
>> to which they point),
>
>You compare pointer values.

Which may not always correspond to what you want; i.e., "these two
structure values have the same values in all their fields" may not be
equivalent to "the objects these structures represent are equal".  If,
say, experience with Ada indicates that they are frequently equivalent,
and that people do use structure comparison heavily, that experience
might, with some care, be applicable to C; otherwise, the right thing to
do is NOT to put it into the standard, but put it into GCC or some other
compiler and see how often it's really used. 



More information about the Comp.std.c mailing list