Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!rutgers!cs.utexas.edu!uunet!kddlab!titcca!sragwa!wsgw!socslgw!diamond From: diamond@csl.sony.co.jp (Norman Diamond) Newsgroups: comp.std.c Subject: Re: No sequence points in assignment Message-ID: <10851@riks.csl.sony.co.jp> Date: 18 Sep 89 04:12:19 GMT References: <1021@m3.mfci.UUCP> <1989Sep13.005247.20121@algor2.algorists.com> <1026@m3.mfci.UUCP> Reply-To: diamond@riks. (Norman Diamond) Distribution: comp Organization: Sony Computer Science Laboratory Inc., Tokyo, Japan Lines: 25 In article <1026@m3.mfci.UUCP> karzes@mfci.UUCP (Tom Karzes) quotes: >The second paragraph in section 3.3 says: > Between the previous and next sequence point an object shall have > its stored value modified at most once by the evaluation of an > expression. Furthermore, the prior value shall be accessed only > to determine the value to be stored. Even if the expression contains two assignments to the same object? (As did the example which led to this thread.) Even without the optimizer turned on, the compiler is REQUIRED to notice and delete all but one assignment to the same object? (Uh, remember that other thread about whether two pointers are equal, and it depends on whether they point to the same object, i.e. things like ring numbers have to be masked out.) Wow, a non-optimizing compiler is going to have to do a lot of alias checking in order to meet section 3.3. -- -- Norman Diamond, Sony Corporation (diamond@ws.sony.junet) The above opinions are inherited by your machine's init process (pid 1), after being disowned and orphaned. However, if you see this at Waterloo or Anterior, then their administrators must have approved of these opinions.