Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10 beta 3/9/83; site cwruecmp.UUCP Path: utzoo!linus!decvax!cwruecmp!decot From: decot@cwruecmp.UUCP (Dave Decot) Newsgroups: net.lang.c Subject: Re: Funny bugs in some C compilers Message-ID: <654@cwruecmp.UUCP> Date: Wed, 14-Sep-83 03:23:21 EDT Article-I.D.: cwruecmp.654 Posted: Wed Sep 14 03:23:21 1983 Date-Received: Wed, 14-Sep-83 07:09:13 EDT References: <275@wateng.UUCP>, <1089@rlgvax.UUCP> Organization: CWRU Computer Engr. Cleveland, Ohio Lines: 20 Seems to me that another solution to the "holes" problem of structure comparison is somewhat clear: Permit comparison of two structures of the same tag or typedef for [in]equality only. If the structure template involved contains no holes, compare the structures using a block-compare instruction (if available). If there ARE holes, the result is the && conjunction [|| disjunction] of comparisons for [in]equality of constituent blocks that have no holes. Thus, those areas of the structures that should be equal are compared, and those that are "holes" are ignored, and the code thus generated can be no worse than that generated by the poor programmer who has to code this comparison by "hand". No? Replies are encouraged. Dave Decot ..!decvax!cwruecmp!decot