inconsistency in C manual

Morris Keesan keesan at bbncca.ARPA
Tue Mar 20 09:32:51 AEST 1984


----------------------------

    The C Language section of the System V Programming Guide corrects the
incosistency introduced into the manual in V7 by the addition of functions
returning structs and unions.  From the Guide, under "EXPRESSIONS/A"

	A primary expression followed by a dot followed by an identifier is an
    expression.  The first expression must be a structure or a union, and the
    identifier must name a member of the structure or union.  The value is the
    named member of the structure or union, and it is an lvalue if the first
    expression is an lvalue.

Also, from the System V Transition Aids,

    3.2 Access to a Member of a Returned Structure or Union.

    Now that the language allows structure and union assignments a bug was
    uncovered in the compiler regarding the immediate access of members of the
    returned structure or union.

    An example of such a construct is:

	x = f().a;

    where f() is a function returning a structure that has a member element of
    "a".

    This bug has been identified and removed from the compiler.


Does anybody have any idea what the referred-to bug is?
-- 
					Morris M. Keesan
					{decvax,linus,wjh12,ima}!bbncca!keesan
					keesan @ BBN-UNIX.ARPA



More information about the Comp.lang.c mailing list