From: jbess Date: Sat, 9 Jun 2001 20:26:45 +0000 (+0000) Subject: Fix access violation on struct declaration and add an include X-Git-Url: https://git.gag.com/?a=commitdiff_plain;h=74bfe960542de56b1479c755682e23e9686abebf;p=fw%2Fsdcc Fix access violation on struct declaration and add an include git-svn-id: https://sdcc.svn.sourceforge.net/svnroot/sdcc/trunk/sdcc@875 4a8a32a2-be11-0410-ad9d-d568d2c75423 --- diff --git a/src/SDCCast.h b/src/SDCCast.h index dc1b6e65..c469be9f 100644 --- a/src/SDCCast.h +++ b/src/SDCCast.h @@ -29,6 +29,7 @@ #include "SDCCsymt.h" #include "SDCCval.h" #include "SDCCset.h" +#include "SDCCmem.h" #define EX_OP 0 #define EX_VALUE 1 diff --git a/src/SDCCsymt.c b/src/SDCCsymt.c index 93ef1d86..07b39065 100644 --- a/src/SDCCsymt.c +++ b/src/SDCCsymt.c @@ -103,7 +103,8 @@ addSym (bucket ** stab, int i; /* index into the hash Table */ bucket *bp; /* temp bucket * */ - checkTypeSanity(((symbol *)sym)->etype, sname); + /* Make sure sym is a symbol and not a structdef */ + if (StructTab!=stab) checkTypeSanity(((symbol *)sym)->etype, sname); /* the symbols are always added at the head of the list */ i = hashKey (sname);