From c50440cba469a7466471952889a88e73ff42bc8c Mon Sep 17 00:00:00 2001 From: johanknol Date: Mon, 8 Oct 2001 13:44:41 +0000 Subject: [PATCH] fixed bug #467893 git-svn-id: https://sdcc.svn.sourceforge.net/svnroot/sdcc/trunk/sdcc@1376 4a8a32a2-be11-0410-ad9d-d568d2c75423 --- src/SDCC.y | 4 ++-- src/SDCCicode.c | 2 +- support/Util/SDCCerr.c | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/SDCC.y b/src/SDCC.y index 95401093..3306c3ee 100644 --- a/src/SDCC.y +++ b/src/SDCC.y @@ -756,11 +756,11 @@ struct_declaration if (!sym->type) { sym->type = copyLinkChain($1); sym->etype = getSpec(sym->type); - /* make sure the type is complete and sane */ - checkTypeSanity(sym->etype, sym->name); } else addDecl (sym,0,cloneSpec($1)); + /* make sure the type is complete and sane */ + checkTypeSanity(sym->etype, sym->name); } $$ = $2; } diff --git a/src/SDCCicode.c b/src/SDCCicode.c index 7b5aa849..0adff9fb 100644 --- a/src/SDCCicode.c +++ b/src/SDCCicode.c @@ -1599,7 +1599,7 @@ geniCodeCast (sym_link * type, operand * op, bool implicit) /* if casting to/from pointers, do some checking */ if (IS_PTR(type)) { // to a pointer - if (!IS_PTR(optype) && !IS_FUNC(optype)) { // from a non pointer + if (!IS_PTR(optype) && !IS_FUNC(optype) && !IS_AGGREGATE(optype)) { // from a non pointer if (IS_INTEGRAL(optype)) { // maybe this is NULL, than it's ok. if (!(IS_LITERAL(optype) && (SPEC_CVAL(optype).v_ulong ==0))) { diff --git a/support/Util/SDCCerr.c b/support/Util/SDCCerr.c index ad1e1abe..8287a867 100644 --- a/support/Util/SDCCerr.c +++ b/support/Util/SDCCerr.c @@ -145,7 +145,7 @@ struct "operand invalid for bitwise operation" }, { E_ANDOR_OP, ERROR_LEVEL_ERROR, "Invalid operand for '&&' or '||'" }, -{ E_TYPE_MISMATCH, ERROR_LEVEL_WARNING, +{ E_TYPE_MISMATCH, ERROR_LEVEL_ERROR, "indirections to different types %s %s " }, { E_AGGR_ASSIGN, ERROR_LEVEL_ERROR, "cannot assign values to aggregates" }, -- 2.47.2