Assignment Ops and Side Effects

Fraser Wilson fraser at mullauna.cs.mu.OZ.AU
Tue Apr 9 13:58:48 AEST 1991


gwyn at smoke.brl.mil (Doug Gwyn) writes:

>In article <18324 at crdgw1.crd.ge.com> volpe at camelback.crd.ge.com (Christopher R Volpe) writes:
>>The result of "c=1" in an expression context should be promoted to int.

>Not if it's the operand of sizeof; that would make sizeof rather useless.

No, it makes performing an assignment while doing a sizeof rather useless.
Requiring that an expression is promoted to int UNLESS it happens to be
in a sizeof seems unduly complicated.  IMHO.

Fraser.



More information about the Comp.lang.c mailing list