From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: <52607cb8b4723e1490f67b6451fc4ef5@felloff.net> Date: Sun, 13 Sep 2015 20:01:24 +0200 From: cinap_lenrek@felloff.net To: 9fans@9fans.net In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit Subject: Re: [9fans] kenc vlong double Topicbox-Message-UUID: 6a45f302-ead9-11e9-9d60-3106f5b1d025 ah, that makes sense. so the bug is in com.c where we use arith() to figure out the type of the operation (which looks in a table indexed by the types of both sides)? but we should instead just assign the type from the left hand side? just assigning t to n->type fixes the type, but why did it call arith() in the first place? --- a/sys/src/cmd/cc/com.c Sun Sep 13 13:51:00 2015 +0200 +++ b/sys/src/cmd/cc/com.c Sun Sep 13 19:59:43 2015 +0200 @@ -182,8 +182,8 @@ r = new1(OCAST, n->right, Z); r->type = t; n->right = r; - n->type = t; } + n->type = t; break; -- cinap