Path: utzoo!attcan!uunet!husc6!uwvax!oddjob!mimsy!chris
From: chris@mimsy.UUCP (Chris Torek)
Newsgroups: comp.std.c
Subject: Re: nonportable code or incorrect compilers?
Message-ID: <12414@mimsy.UUCP>
Date: 12 Jul 88 14:01:55 GMT
References: <133@daitc.ARPA> <430@uwovax.uwo.ca> <376@accelerator.eng.ohio-state.edu>
Organization: U of Maryland, Dept. of Computer Science, Coll. Pk., MD 20742
Lines: 14

In article <376@accelerator.eng.ohio-state.edu> rob@kaa.eng.ohio-state.edu
(Rob Carriere) writes:
[re int a; ... a *= 1.05;]
>... the conversion rule says that a is to be converted to double; this
>seems to contradict the idea that a is to be computed *once*.

Right idea, wrong expansion: a's *address* (if it has one) is to be
computed once.  (a itself is indeed computed only once: if a is 800 it
is computed/evaluated as 800.  That value, now in a temporary
somewhere, is converted to double, multipled, and stored back in a's
address.)
-- 
In-Real-Life: Chris Torek, Univ of MD Comp Sci Dept (+1 301 454 7163)
Domain:	chris@mimsy.umd.edu	Path:	uunet!mimsy!chris