C sintax

wsmith at uiucdcsb.cs.uiuc.edu wsmith at uiucdcsb.cs.uiuc.edu
Sat Feb 6 01:18:00 AEST 1988


In <548 at gtx.com>, al at gtx.com (Alan Filipski) writes:
> I'll stick my neck out and say I don't think there ARE any syntactic
> ambiguities in C. (there are, of course, the semantic ones resulting
> from undefined order of evaluation).  The potential ambiguities such
> as the dangling else and those involving the comma operator are solved
> by fiat.
> 
> Are there any syntactic ambiguities K&R didn't resolve?
> 
>     ----------------------------------------------------------------------
>    | Alan Filipski, GTX Corp, 2501 W. Dunlap, Phoenix, Arizona 85021, USA |
>    | {ihnp4,cbosgd,decvax,hplabs,amdahl}!sun!sunburn!gtx!al (602)870-1696 |
>     ----------------------------------------------------------------------

main()
{
    int a,b;
 
    a = 0; b = 0;

    printf("%0d",a+++b);
}

Is this (a++)+b or a+(++b)?

Bill Smith
pur-ee!uiucdcs!wsmith
wsmith at a.cs.uiuc.edu



More information about the Comp.lang.c mailing list