Path: utzoo!mnetor!uunet!husc6!bbn!uwmcsd1!ig!agate!ucbvax!cbosgd!osu-cis!tut!lvc From: lvc@tut.cis.ohio-state.edu (Lawrence V. Cipriani) Newsgroups: comp.lang.c Subject: Re: Some possible deficiencies in dpANS (or whatever its called) Message-ID: <5009@tut.cis.ohio-state.edu> Date: 21 Jan 88 14:51:09 GMT References: <4755@tut.cis.ohio-state.edu> <7134@brl-smoke.ARPA> Organization: Ohio State Computer & Info Science Lines: 47 Keywords: none Summary: I take it all back! In article <7134@brl-smoke.ARPA>, gwyn@brl-smoke.ARPA (Doug Gwyn ) writes: > In article <4755@tut.cis.ohio-state.edu> lvc@tut.cis.ohio-state.edu (Lawrence V. Cipriani) writes: > >it looks like the following are valid *statements*: > > i; > > j << 2; > > k == 0; > > "hello world\n"; > > Yes. > > >I believe this is a deficiency. These statements have no effect ... > > Such statements may be produced by macro expansion. There doesn't > seem to be any reason to outlaw them. In fact, the first three > all "touch" a variable and therefore do have a practical effect, > sometimes. Think Larry think! I take it back, they should not be prohibited. Also, I did not mean to include functions as having null effect. Even functions that do have null effect can be useful. > > >and in fact lint flags them. > > This is probably the best way to protect against actual errors > like this. Yes, however, the first three errors were in code that was literally impossible to lint since there were no lint librares; it was in SVR2 (well at least the version we hack up on my project). Also, some users of C do not have lint. It would be desirable if these at least produced warnings. This is what I will suggest to X3J11. > >2) In the definition of the sizeof operator, the sentence ... Thanks for the info on sizeof for arrays. Be warned that I am collecting all context diffs and postings of the proposed standard and in about 10 years I should have it free of any copyright restrictions! -- oo 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)