Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.1a 7/7/83; site rlgvax.UUCP Path: utzoo!linus!decvax!harpo!seismo!rlgvax!guy From: guy@rlgvax.UUCP (Guy Harris) Newsgroups: net.lang.c Subject: Re: Funny bugs in some C compilers Message-ID: <1089@rlgvax.UUCP> Date: Thu, 1-Sep-83 18:21:09 EDT Article-I.D.: rlgvax.1089 Posted: Thu Sep 1 18:21:09 1983 Date-Received: Fri, 2-Sep-83 20:52:36 EDT References: <275@wateng.UUCP> Organization: CCI Office Systems Group, Reston, VA Lines: 33 According to "Recent Changes to C", distributed both with V7 and System III UNIX: "Structures may be assigned, passed as arguments to functions, and returned by functions. ... Other plausible operators, such as equality comparison, have not been implemented." From a document distributed in machine-readable form only(!) with System III: Structure assignment has been added to the C language to simplify both the source and object code associated with transferring the value of one structure instance to another and to allow functions to return aggregate values when invoked. Since many processors now contain some type of `move block' instruction, structure assignment will permit more efficient use of many machines. It also makes source programs more readable. Structures may be assigned, passed as arguments to functions, and returned by functions. The types of structure operands taking part must be the same. Other plausible operators, such as equality comparison and structure casts, are not being implemented due to the difficulties associated with "holes" in structures caused by alignment restrictions. So the problem with structure comparison is known; in fact, that's why none of the C compilers I've encountered implement it. Guy Harris {seismo,mcnc,we13,brl-bmd,allegra}!rlgvax!guy