X-Git-Url: https://git.gag.com/?a=blobdiff_plain;f=src%2FSDCCast.c;h=391408318222ae2d9a396d048770554239edceaf;hb=eae1bd2f705a2c61e143c539f8c4d1e9c2b4efe6;hp=bdae3d5a90e620d7a4eeb4dc15329530eae0103c;hpb=c6306c2fbf7c546ffebe284ffeb4ea55ed765811;p=fw%2Fsdcc diff --git a/src/SDCCast.c b/src/SDCCast.c index bdae3d5a..39140831 100644 --- a/src/SDCCast.c +++ b/src/SDCCast.c @@ -3251,7 +3251,7 @@ decorateType (ast * tree, RESULT_TYPE resultType) werrorfl (tree->filename, tree->lineno, E_LVALUE_REQUIRED, "pointer deref"); goto errorTreeReturn; } - if (IS_ADDRESS_OF_OP(tree->left)) + if (IS_ADDRESS_OF_OP (tree->left)) { /* replace *&obj with obj */ return tree->left->left; @@ -4687,8 +4687,7 @@ decorateType (ast * tree, RESULT_TYPE resultType) printFromToType(RTYPE(tree), LTYPE(tree)); } - TETYPE (tree) = getSpec (TTYPE (tree) = - LTYPE (tree)); + TETYPE (tree) = getSpec (TTYPE (tree) = LTYPE (tree)); RRVAL (tree) = 1; LLVAL (tree) = 1; if (!tree->initMode ) { @@ -4794,7 +4793,7 @@ decorateType (ast * tree, RESULT_TYPE resultType) decorateType (newNode (CAST, newAst_LINK (copyLinkChain (currFunc->type->next)), tree->right), - RESULT_TYPE_NONE); + IS_GENPTR (currFunc->type->next) ? RESULT_TYPE_GPTR : RESULT_TYPE_NONE); } RRVAL (tree) = 1;