Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.c > #77304

Re: ->=

From Keith Thompson <kst-u@mib.org>
Newsgroups comp.lang.c
Subject Re: ->=
Date 2015-11-27 19:37 -0800
Organization None to speak of
Message-ID <lnvb8myetj.fsf@kst-u.example.com> (permalink)
References <n34i16$puk$1@speranza.aioe.org> <kfn7fl3ytq6.fsf@x-alumni2.alumni.caltech.edu> <cf4e364d-de82-449a-bc76-deb580136a79@googlegroups.com> <n3apdj$r7u$1@dont-email.me>

Show all headers | View raw


BartC <bc@freeuk.com> writes:
[...]
>> On Friday, November 27, 2015 at 4:15:37 PM UTC-6, Tim Rentsch wrote:
[...]
>  >> best it's no more than syntactic saccharin.  Note also it
>  >> requires revising the rule stated in the first sentence of
>  >> 6.5.16.2 p3.  Kind of sticks out like a sort thumb.
>
> I didn't understand that bit. But I can see that if a member name 
> normally only follows a "." or "->" token, now it will need to be 
> allowed after "->=" too. It can't just be mapped to = and ->, unless the 
> implementation ensures that any side-effects occur just once.

6.5.16.2p3 says:

    A compound assignment of the form E1 op = E2 is equivalent to
    the simple assignment expression E1 = E1 op (E2), except that
    the lvalue E1 is evaluated only once, and with respect to an
    indeterminately-sequenced function call, the operation of a
    compound assignment is a single evaluation.

The semantics of the `->=` operator would have to be defined
without the parentheses, since `foo->(bar)` is illegal even when
`foo->bar` is legal.  Not a fatal problem, but it would be one more
special case.

(Tim: I suggest that you'd save a some people some time if you'd quote
the sentence rather than just citing the section and paragraph number.)

-- 
Keith Thompson (The_Other_Keith) kst-u@mib.org  <http://www.ghoti.net/~kst>
Working, but not speaking, for JetHead Development, Inc.
"We must do something.  This is something.  Therefore, we must do this."
    -- Antony Jay and Jonathan Lynn, "Yes Minister"

Back to comp.lang.c | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

->= glen herrmannsfeldt <gah@ugcs.caltech.edu> - 2015-11-25 14:53 +0000
  Re: ->= Richard Heathfield <rjh@cpax.org.uk> - 2015-11-25 15:12 +0000
    Re: ->= James Kuyper <jameskuyper@verizon.net> - 2015-11-25 11:51 -0500
      Re: ->= "Rick C. Hodgin" <rick.c.hodgin@gmail.com> - 2015-11-25 09:49 -0800
      Re: ->= supercat@casperkitty.com - 2015-11-25 09:55 -0800
    Re: ->= John Bode <jfbode1029@gmail.com> - 2015-11-25 12:24 -0800
      Re: ->= James Kuyper <jameskuyper@verizon.net> - 2015-11-25 15:40 -0500
        Re: ->= John Bode <jfbode1029@gmail.com> - 2015-11-27 17:14 -0800
          Re: ->= James Kuyper <jameskuyper@verizon.net> - 2015-11-27 20:28 -0500
  Re: ->= "Rick C. Hodgin" <rick.c.hodgin@gmail.com> - 2015-11-25 07:35 -0800
  Re: ->= "Charles Richmond" <numerist@aquaporin4.com> - 2015-11-25 15:47 -0600
    Re: ->= James Kuyper <jameskuyper@verizon.net> - 2015-11-25 17:04 -0500
    Re: ->= Nobody <nobody@nowhere.invalid> - 2015-11-26 10:58 +0000
      Re: ->= supercat@casperkitty.com - 2015-11-26 08:55 -0800
  Re: ->= raltbos@xs4all.nl (Richard Bos) - 2015-11-26 00:48 +0000
  Re: ->= Tim Rentsch <txr@alumni.caltech.edu> - 2015-11-27 14:15 -0800
    Re: ->= supercat@casperkitty.com - 2015-11-27 14:26 -0800
      Re: ->= BartC <bc@freeuk.com> - 2015-11-27 23:38 +0000
        Re: ->= Keith Thompson <kst-u@mib.org> - 2015-11-27 19:37 -0800
          Re: ->= Tim Rentsch <txr@alumni.caltech.edu> - 2015-11-28 06:35 -0800
      Re: ->= Stephen Sprunk <stephen@sprunk.org> - 2015-11-27 17:51 -0600
      Re: ->= Tim Rentsch <txr@alumni.caltech.edu> - 2015-11-28 06:53 -0800
        Re: ->= glen herrmannsfeldt <gah@ugcs.caltech.edu> - 2015-11-28 17:12 +0000
          Re: ->= Keith Thompson <kst-u@mib.org> - 2015-11-28 10:26 -0800
            Re: ->= glen herrmannsfeldt <gah@ugcs.caltech.edu> - 2015-11-28 19:50 +0000
          Re: ->= BartC <bc@freeuk.com> - 2015-11-28 19:14 +0000
            Re: ->= supercat@casperkitty.com - 2015-11-28 11:48 -0800
              Re: ->= glen herrmannsfeldt <gah@ugcs.caltech.edu> - 2015-11-29 22:33 +0000
            Re: ->= glen herrmannsfeldt <gah@ugcs.caltech.edu> - 2015-11-28 20:18 +0000
              Re: ->= Stephen Sprunk <stephen@sprunk.org> - 2015-11-28 18:15 -0600
                Re: ->= glen herrmannsfeldt <gah@ugcs.caltech.edu> - 2015-11-29 22:44 +0000
                Re: ->= Stephen Sprunk <stephen@sprunk.org> - 2015-11-29 18:25 -0600
                Re: ->= raltbos@xs4all.nl (Richard Bos) - 2015-11-30 10:21 +0000
            Re: ->= Keith Thompson <kst-u@mib.org> - 2015-11-28 13:10 -0800
              Re: ->= BartC <bc@freeuk.com> - 2015-11-28 22:12 +0000
                Re: ->= raltbos@xs4all.nl (Richard Bos) - 2015-11-29 11:42 +0000
                Re: ->= BartC <bc@freeuk.com> - 2015-11-29 14:24 +0000
                Re: "->=" Eric Sosman <esosman@comcast-dot-net.invalid> - 2015-11-29 10:33 -0500
                Re: "->=" BartC <bc@freeuk.com> - 2015-11-29 17:49 +0000
                Re: ->= supercat@casperkitty.com - 2015-11-29 11:50 -0800
                Re: ->= BartC <bc@freeuk.com> - 2015-11-29 22:37 +0000
                Re: ->= Keith Thompson <kst-u@mib.org> - 2015-11-30 00:23 -0800
              Re: ->= glen herrmannsfeldt <gah@ugcs.caltech.edu> - 2015-11-29 23:00 +0000
                Re: ->= Keith Thompson <kst-u@mib.org> - 2015-11-30 00:28 -0800
                Re: ->= Rosario19 <Ros@invalid.invalid> - 2015-12-13 16:29 +0100
  Re: ->= Eric Sosman <esosman@comcast-dot-net.invalid> - 2015-11-28 14:59 -0500

csiph-web