X-Git-Url: https://git.gag.com/?a=blobdiff_plain;f=src%2FSDCCast.c;h=d82a071942e6a1615652bc0b8433f36489bc0703;hb=a7fb08c9628f5abe2bec8841a6a5eb271b22f6fb;hp=108f6d73e7d4fc89eea38853d720f6c9dfad2cfd;hpb=bae1ba55d40438d14536bc63de419d582ae5227e;p=fw%2Fsdcc diff --git a/src/SDCCast.c b/src/SDCCast.c index 108f6d73..d82a0719 100644 --- a/src/SDCCast.c +++ b/src/SDCCast.c @@ -1030,8 +1030,12 @@ createIvalCharPtr (ast * sym, sym_link * type, ast * iexpr) if (size>symsize) { if (size>(symsize+1)) - werrorfl (iexpr->filename, iexpr->lineno, W_EXCESS_INITIALIZERS, - "string", sym->opval.val->sym->name); + { + char *name = (IS_AST_SYM_VALUE(sym)) ? AST_SYMBOL(sym)->name : ""; + + werrorfl (iexpr->filename, iexpr->lineno, W_EXCESS_INITIALIZERS, + "string", name); + } size = symsize; }