Undelivered mail

MAILER%ALASKA.BITNET at CUNYVM.CUNY.EDU MAILER%ALASKA.BITNET at CUNYVM.CUNY.EDU
Sat Mar 12 15:51:25 AEST 1988


Subject:  Re: I forget what it was originally called.

[Non-Deliverable:  User does not exist or has never logged on]

Reply-To: Info-C at BRL.ARPA

Received: From UWAVM(MAILER) by ALASKA with Jnet id 6593
          for SXJVK at ALASKA; Fri, 11 Mar 88 20:28 AST
Received: by UWAVM (Mailer X1.25) id 4428; Fri, 11 Mar 88 21:15:23 PST
Date:         Mon, 7 Mar 88 16:21:36 GMT
Reply-To:     Info-C at BRL.ARPA
Sender:       Info-C List <INFO-C at NDSUVM1>
From:         Mike McNelly <mike at hpfclq.HP.COM>
Subject:      Re: I forget what it was originally called.
Comments: To: info-c at brl-smoke.arpa
To:           Vic Kapella <SXJVK at ALASKA>

Not only do different types cause changes in the order of evaluation,
but different classes may also cause differences.  C compilers make
choices on the order of evaluation based on the "cost" of evaluating a
subexpression.  Pcc compilers typically evaluate a a subexpression with
a high cost in register resources first.

As a specific example, you may find your expression compiled differently
if "i" is declared to be a register variable than if it was an auto or a
static.

Frankly I have little sympathy with anyone writing code in this manner.
It's cute but it's also no more efficient than alternatives that do what
you really wanted to do in a much less ambiguous fashion.  If you
inherited this code you have my condolences.



Mike McNelly
hplabs!hpfcla!mike



More information about the Comp.lang.c mailing list