From mboxrd@z Thu Jan 1 00:00:00 1970 MIME-Version: 1.0 In-Reply-To: References: Date: Tue, 21 Oct 2014 21:53:20 +0100 Message-ID: From: Charles Forsyth To: Fans of the OS Plan 9 from Bell Labs <9fans@9fans.net> Content-Type: multipart/alternative; boundary=f46d04426c52775edd0505f505f3 Subject: Re: [9fans] copy paste bug in cc.y? Topicbox-Message-UUID: 1f7d47c6-ead9-11e9-9d60-3106f5b1d025 --f46d04426c52775edd0505f505f3 Content-Type: text/plain; charset=UTF-8 On 21 October 2014 18:34, Yoann Padioleau wrote: > but (0:int + x) would not do the same thing? What is special about using > SUB instead > of ADD? > you can't subtract pointers from 0 but you can add 0 to a pointer, since + is commutative --f46d04426c52775edd0505f505f3 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable

= On 21 October 2014 18:34, Yoann Padioleau <pad@fb.com> wrote:
but (0:int + x) =C2=A0 would not do the s= ame thing? What is special about using SUB instead
of ADD?

you can't subtract pointers fr= om 0 but you can add 0 to a pointer, since + is commutative
--f46d04426c52775edd0505f505f3--