Path: utzoo!utgpu!water!watmath!clyde!bellcore!rutgers!gatech!bloom-beacon!athena.mit.edu!jfc
From: jfc@athena.mit.edu (John F Carr)
Newsgroups: comp.std.c
Subject: Re: nonportable code or incorrect compilers?
Message-ID: <6142@bloom-beacon.MIT.EDU>
Date: 12 Jul 88 01:44:52 GMT
References: <133@daitc.ARPA> <430@uwovax.uwo.ca> <374@accelerator.eng.ohio-state.edu> <8228@brl-smoke.ARPA> <376@accelerator.eng.ohio-state.edu>
Sender: daemon@bloom-beacon.MIT.EDU
Reply-To: jfc@athena.mit.edu (John F Carr)
Organization: Massachusetts Institute of Technology
Lines: 24

In article <376@accelerator.eng.ohio-state.edu> 
rob@kaa.eng.ohio-state.edu (Rob Carriere) writes:

>Whoops.  You didn't see it because it isn't there, I *did* mean
>conversion.  However, 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*.

I thought the purpose of the definition was so that things like subscripts
and function calls needed to compute the lhs would not be repeated:

 a[f(x++) + --y] += 43;

has different results than

 a[f(x++) + --y]  =  a[f(x++) + --y] + 43;

To make this consistent with the standard, distinguish between "evaluation"
and the type conversions required in computation.

   John Carr             "When they turn the pages of history,
   jfc@Athena.mit.edu     When these days have passed long ago,
                          Will they read of us with sadness
                          For the seeds that we let grow?"  --Neil Peart