Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.1 6/24/83; site cmcl2.UUCP Path: utzoo!linus!decvax!harpo!gummo!whuxlb!floyd!cmcl2!edler From: edler@cmcl2.UUCP Newsgroups: net.lang.c Subject: Re: Funny bugs in some C compilers - (nf) Message-ID: <33210@cmcl2.UUCP> Date: Wed, 14-Sep-83 16:55:09 EDT Article-I.D.: cmcl2.33210 Posted: Wed Sep 14 16:55:09 1983 Date-Received: Thu, 15-Sep-83 06:09:35 EDT Sender: edler@cmcl2.UUCP Organization: New York University Lines: 27 #R:wateng:-27500:cmcl2:15400004:000:711 cmcl2!edler Sep 14 16:54:00 1983 The following suggestion has been made: 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. This won't work for structures containing unions of different-sized components. For example, I don't see how any C compiler can compare two instances of the following structure: struct a { int b; union { char c; long d; } e; }; Jan Edler cmcl2!edler (New York University) edler@nyu