do ++ and -- yield lvalues?

phil at ux1.cso.uiuc.edu phil at ux1.cso.uiuc.edu
Sat Feb 3 12:39:42 AEST 1990


Does a postincrement or postdecrement operator yield an lvalue?

In other words, is the following valid?

    int n,a,b;
    (n++) = a + b;

I suspect the following is not, as (a+b) is not an lvalue:

    int n,a,b;
    n = ++( a + b );

and the first example would be equivalent to:

    int n,a,b;
    n = ( a + b ) + 1;

--Phil Howard, KA9WGN--
<phil at ux1.cso.uiuc.edu>



More information about the Comp.lang.c mailing list