src/sccz80/expr.c
/*
 * perform lval manipulation for pointer dereferencing/array subscripting
 */
perform lval manipulation for pointer dereferencing/array subscripting
perform lval manipulation for pointer dereferencing / array subscripting
SYMBOL *deref(LVALUE* lval, char isaddr)
{
    Type *old_type = lval->ltype;
    lval->symbol = NULL;
    if ( ispointer(lval->ltype) && lval->ltype->ptr->kind == KIND_FUNC ) {
        return lval->symbol;
    }
    lval->ltype = lval->ltype->ptr;
    if ( lval->ltype->kind != KIND_PTR && lval->ltype->kind != KIND_CPTR )
        lval->ptr_type = KIND_NONE;
    else
        lval->ptr_type = lval->ltype->ptr->kind;
    lval->val_type = lval->indirect_kind = lval->ltype->kind;
    if ( old_type->kind == KIND_CPTR ) {
        lval->flags |= FARACC;
    } else {
        lval->flags &= ~FARACC;
    }
    return lval->symbol;
}
SYMBOL * deref ( LVALUE * lval , char isaddr ) { Type * old_type = lval -> ltype ; lval -> symbol = NULL ; if ( ispointer ( lval -> ltype ) && lval -> ltype -> ptr -> kind == KIND_FUNC ) { return lval -> symbol ; } lval -> ltype = lval -> ltype -> ptr ; if ( lval -> ltype -> kind != KIND_PTR && lval -> ltype -> kind != KIND_CPTR ) lval -> ptr_type = KIND_NONE ; else lval -> ptr_type = lval -> ltype -> ptr -> kind ; lval -> val_type = lval -> indirect_kind = lval -> ltype -> kind ; if ( old_type -> kind == KIND_CPTR ) { lval -> flags |= FARACC ; } else { lval -> flags &= ~ FARACC ; } return lval -> symbol ; }
perform lval manipulation for pointer dereferencing/array subscripting
perform lval manipulation for pointer dereferencing / array subscripting