Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!henry From: henry@utzoo.UUCP (Henry Spencer) Newsgroups: net.lang.c Subject: Re: side effects inside sizeof Message-ID: <3865@utzoo.UUCP> Date: Wed, 16-May-84 18:00:19 EDT Article-I.D.: utzoo.3865 Posted: Wed May 16 18:00:19 1984 Date-Received: Wed, 16-May-84 18:00:19 EDT References: utzoo.3844 <283@idis.UUCP>, <502@ihuxj.UUCP> Organization: U of Toronto Zoology Lines: 22 Joey Duhon says, in part: 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). All this is quite true, and I was aware of page 126. But the definition of the language is the C Reference Manual, ***NOT*** the textbook that happens to precede one particular edition of it. All page 126 tells us is what DMR *intended*, but that's been clear all along anyway. -- Henry Spencer @ U of Toronto Zoology {allegra,ihnp4,linus,decvax}!utzoo!henry