Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!wuarchive!udel!haven!ncifcrf!lhc!adm!smoke!gwyn From: gwyn@smoke.brl.mil (Doug Gwyn) Newsgroups: comp.lang.c Subject: Re: Assignment Ops and Side Effects Message-ID: <15814@smoke.brl.mil> Date: 12 Apr 91 21:33:46 GMT References: <18355@crdgw1.crd.ge.com> <15777@smoke.brl.mil> <18393@crdgw1.crd.ge.com> Organization: U.S. Army Ballistic Research Laboratory, APG, MD. Lines: 39 In article <18393@crdgw1.crd.ge.com> volpe@camelback.crd.ge.com (Christopher R Volpe) writes: >3.2.1.1: A char ... may be used in an expression wherever an int or > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ >This appears to say that this conversion occurs in any expression >context, subject to explicit exceptions made elsewhere. That's why you have to read the whole standard. On the same page, at the beginning of section 3.2, it explains when the conversions apply. The result type for simple assignment is well specified. There is no license for applying any further conversion while evaluating "sizeof(c=1)" EVEN ACCORDING TO YOUR ATTEMPT, unless you wish "sizeof char_variable_name" to also be affected, which is clearly not desirable. >I didn't notice the footnote. Other people were able to point this >out to me in a polite, civilized, non-hostile, and non-insulting manner. >With all due respect, perhaps you could learn to chill out a bit. Not all >of us were on the committee and not all of us have the whole document >memorized and not all of us are so perfect as to not be able to miss a >footnote. The footnote is not part of the standard. It was probably added in response to some public review comment, maybe over the Redactor's protests (several footnotes fell into that category), but was considered technically inessential to a correct specification. My response was civil, but if you choose to take it as an insult then you're welcome to do so. >|>I see no room for for thinking that any sort of conversion should be >|>performed. >I think you mean, "I see no room for not having as thorough an >understanding of the language as I have." No, I meant what I said. See my above analysis of the consequences of carrying through what you had proposed as an interpretation. I do expect you to think through the full consequences of any such notion when attempting to evaluate whether it makes sense or not.