Path: utzoo!mnetor!uunet!husc6!bbn!uwmcsd1!ig!agate!jade!ucbvax!cbosgd!osu-cis!tut!lvc From: lvc@tut.cis.ohio-state.edu (Lawrence V. Cipriani) Newsgroups: comp.lang.c Subject: Some possible deficiencies in dpANS (or whatever its called) Message-ID: <4755@tut.cis.ohio-state.edu> Date: 18 Jan 88 14:34:41 GMT Organization: Ohio State Computer & Info Science Lines: 49 Keywords: none I was looking over the Oct '86 draft and noticed a couple of things I believe are deficiencies. If these have been corrected then n this posting. 1) In the definition of statement (section 3.6) one of the legal forms of statement is the expression and null statement (section 3.6.3). The syntax is: expression-statement: expression ; opt Looking at the definitions of the various types of expressions it looks like the following are valid *statements*: i; j << 2; k == 0; "hello world\n"; I believe this is a deficiency. These statements have no effect (other than eating a machine cycle which might be desired I guess), and in fact lint flags them. This is related to the "language induced errors" discussion recently. The programmer probably meant to write: i++; /* or something similar */ j <<= 2; k = 0; p = "hello world\n"; /* or something similar */ If the current draft allows these null effect statements (other than the null statement) please consider disallowing them. Please mail me an address to write to so I may raise this objection. 2) In the definition of the sizeof operator, the sentence "When applied to an operand that has array type, the result is the total number of bytes in the array". Perhaps I didn't look in the right place; I can't find a place where the total number of bytes in the array is defined. Is it the product of the dimensions with the size of the "base type"? Is an implementation allowed to do something else? Thanks, -- Larry Cipriani, AT&T Networks Systems (by day) Ohio State University (by night) Domain: lvc@tut.cis.ohio-state.edu Path: ...!cbosgd!osu-cis!tut.cis.ohio-state.edu!lvc (yes its right)