Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.1 exptools 1/6/84; site ihuxj.UUCP Path: utzoo!watmath!clyde!burl!ulysses!mhuxl!ihnp4!ihuxj!duhon From: duhon@ihuxj.UUCP (duhon) Newsgroups: net.lang.c Subject: Re: side effects inside sizeof Message-ID: <502@ihuxj.UUCP> Date: Tue, 15-May-84 09:42:55 EDT Article-I.D.: ihuxj.502 Posted: Tue May 15 09:42:55 1984 Date-Received: Wed, 16-May-84 03:42:43 EDT References: utzoo.3844 <283@idis.UUCP> Organization: AT&T Bell Labs, Naperville, IL Lines: 20 Having read all the speculation about what "sizeof expression" should present, I thought I'd read the manual ("The C Programming Language," Kernighan and Ritchie). On page 126 we read "The expression sizeof(object) yields an integer equal to the size of the specified object. ... The object can be an acutual variable or array or structure, ..." I don't see anything here about other expressions. The confusion seems to be over the reference manual which indicates that the grammar will accept "sizeof expression" syntactically. This is obviously a shortcut for the compiler writer(s). However, the semantic interpretation is explained above(p.126). As an aside, "Programming in C," by Kockan says the following: "The argument to the sizeof operator can be a variable, an array name, the name of a basic data type, or the name of a derived data type." This all seems clear to me. Joey Duhon ihnp4!ihuxj!duhon