floating pt errors..

r.j.greenberg rjg1 at mtgzy.att.com
Wed Mar 1 01:06:35 AEST 1989


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



More information about the Comp.lang.c mailing list