[comp.lang.c] do ++ and -- yield lvalues?

phil@ux1.cso.uiuc.edu (02/03/90)

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@ux1.cso.uiuc.edu>