Article View: net.lang.c
Article #9476Re: expression sequencing bugs
From: Chris Sylvain
Date: Wed, 01 Oct 1986 14:12
Date: Wed, 01 Oct 1986 14:12
28 lines
1707 bytes
1707 bytes
In article <4197@brl-smoke.ARPA> C90630JG%WUVMD.BITNET@wiscvm.ARPA writes:
>In article <760@oakhill.UUCP> tomc@oakhill.UUCP (Tom Cunningham) writes:
>> /* a = b + b + b */
>> a = ((b=1),b) + ((b=2),b) + ((b=3),b)
>>
>>I expected the result to be 6. With the Microsoft C compiler and the
>>compiler on the Sun 3, the result is 9. Apparently the parenthetical
>>assignments are all getting done before the comma and addition. Any
>>thoughts on this?
> ........
>I would like everyone to test it on as many machines as prossible, to
>see if we can find as least ONE other besides Small-C, that works.
>Mike Stump ucbvax!hplabs!csun!csunb!beusemrs
>
The microVAX running Ultrix V1.2 that I am using insists the result
is 9.
Has anyone tested 4.3BSD yet?
--
--==---==---==--
.. Long time the manxome foe he sought -- ..
ARPA: don@umd5.UMD.EDU BITNET: don%umd5@umd2
UUCP: ..!{ seismo!umcp-cs, ihnp4!rlgvax }!cvl!umd5!don
** WARNING: don@mimsy.UMD.EDU is a different person **
** (umcp-cs and mimsy.umd.edu are the same machine) **
** --> Please double-check the address <-- **
Technical Details
Message-ID:
<1269@umd5>Path:
arc1-ca.pugleaf.net!utzoo!watmath!clyde!caip!lll-crg!seismo!umcp-cs!cvl!umd5!donReferences:
<4197@brl-smoke.ARPA>Show Full Headers
Complete Article Headers
Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: arc1-ca.pugleaf.net!utzoo!watmath!clyde!caip!lll-crg!seismo!umcp-cs!cvl!umd5!don From: don@umd5 (Chris Sylvain) Newsgroups: net.lang.c Subject: Re: expression sequencing bugs Message-ID: <1269@umd5> Date: Wed, 1-Oct-86 10:12:01 EDT Article-I.D.: umd5.1269 Posted: Wed Oct 1 10:12:01 1986 Date-Received: Sat, 4-Oct-86 12:13:38 EDT References: <4197@brl-smoke.ARPA> Reply-To: don@umd5.umd.edu (Chris Sylvain) Organization: University of Maryland, College Park Lines: 28 Summary: uVAX running Ultrix V1.2 says the answer is 9