rjg1@mtgzy.att.com (r.j.greenberg) (02/28/89)
I recently developed an application on the 6386 running 5.3.2. I ported
my source over to a UNIX PC and noticed the the C-compiler issues an
error on an assgnmnt stmt referencing pointers to floating pt
variables, e.g..
double charge;
struct {
double *charge;
} *p, *tmp;
/* initialize all pointers - p, tmp. p->charge, tmp->charge .. */
*p->charge = *tmp->charge = charge;
The error flagged by the compiler is:
compiler allocation error : op STAR;
When I broke up this multiple assnmnt into 2 stmts, it compiled cleanly..
*tmp->charge = charge; *p->charge = *tmp->charge;
Any explanations ?
R. Greenberg
lzmi!rjg
guy@auspex.UUCP (Guy Harris) (03/02/89)
>Any explanations ?
Yes. Your compiler has what is technically known as a "bug", and you
have applied what is technically known as a "workaround".