Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!crdgw1!camelback!volpe From: volpe@camelback.crd.ge.com (Christopher R Volpe) Newsgroups: comp.lang.c Subject: Re: Assignment Ops and Side Effects Message-ID: <18393@crdgw1.crd.ge.com> Date: 10 Apr 91 13:23:36 GMT References: <18324@crdgw1.crd.ge.com> <15765@smoke.brl.mil> <18355@crdgw1.crd.ge.com> <15777@smoke.brl.mil> Sender: news@crdgw1.crd.ge.com Reply-To: volpe@camelback.crd.ge.com (Christopher R Volpe) Lines: 44 In article <15777@smoke.brl.mil>, gwyn@smoke.brl.mil (Doug Gwyn) writes: |>Yeah -- the whole damn standard. It doesn't contain a specific |>statement that says "Don't invent rules along the lines of Volpe"; |>instead it gives rules for properly determining what does happen: |>3.3.16 Semantics: The type of an assignment expression is the type of |>the left operand... |>3.3.3.4 Semantics: The sizeof operator ... size is determined from |>the type of the operand, which is not itself evaluated. |>performed. 3.2.1.1: A char ... may be used in an expression wherever an int or ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ unsigned int may be used. If an int can represent all values of the original typ ^^^^^^^^^^^^^^^^^^^^^^^^^ e, the value is converted to an int.; otherwise, it is converted to an unsigned int. These are called the integral promotions. This appears to say that this conversion occurs in any expression context, subject to explicit exceptions made elsewhere. Footnote 27, which is not even technically part of the standard, clarifies this by saying, in effect, that these promotions are done only where explicitly indicated, not by default with possible exceptions. Obviously someone thought that people might reach the same wrong conclusion as I did, otherwise there would be no footnote. 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. |>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." ================== Chris Volpe G.E. Corporate R&D volpecr@crd.ge.com