X-Git-Url: https://git.gag.com/?a=blobdiff_plain;f=src%2FSDCCglue.c;h=f753441a01b4b846a60e6821771ccac47b8c472d;hb=6c78bc0cba530b6d01daaedcbb327a1f06013c27;hp=c65ca88ab012e2b7e3a35f422b4c26c3ffa43a17;hpb=7e7397e33149e0a075535a1a19511b00827693eb;p=fw%2Fsdcc diff --git a/src/SDCCglue.c b/src/SDCCglue.c index c65ca88a..f753441a 100644 --- a/src/SDCCglue.c +++ b/src/SDCCglue.c @@ -370,6 +370,8 @@ initPointer (initList * ilist, sym_link *toType) DCL_TYPE (val->type) = CPOINTER; DCL_PTR_CONST (val->type) = port->mem.code_ro; } + else if (SPEC_SCLS (expr->left->etype) == S_PDATA) + DCL_TYPE (val->type) = PPOINTER; else if (SPEC_SCLS (expr->left->etype) == S_XDATA) DCL_TYPE (val->type) = FPOINTER; else if (SPEC_SCLS (expr->left->etype) == S_XSTACK) @@ -429,6 +431,8 @@ initPointer (initList * ilist, sym_link *toType) DCL_TYPE (val->type) = CPOINTER; DCL_PTR_CONST (val->type) = port->mem.code_ro; } + else if (SPEC_SCLS (expr->right->etype) == S_PDATA) + DCL_TYPE (val->type) = PPOINTER; else if (SPEC_SCLS (expr->right->etype) == S_XDATA) DCL_TYPE (val->type) = FPOINTER; else if (SPEC_SCLS (expr->right->etype) == S_XSTACK) @@ -774,9 +778,6 @@ printIvalChar (symbol * sym, sym_link * type, initList * ilist, struct dbuf_s * { if (!size) { - werror (E_INTERNAL_ERROR, __FILE__, __LINE__, - "size should never be 0"); - /* we have not been given a size, but now we know it */ size = strlen (SPEC_CVAL (val->etype).v_char) + 1; /* but first check, if it's a flexible array */