From: sandeep Date: Wed, 19 Dec 2001 05:10:46 +0000 (+0000) Subject: if "const" specified with other storage class then storage class prevails X-Git-Url: https://git.gag.com/?a=commitdiff_plain;h=0ff6ce0835504fa885ced47af2fd721d4d814d43;p=fw%2Fsdcc if "const" specified with other storage class then storage class prevails don't put the variable into code segment git-svn-id: https://sdcc.svn.sourceforge.net/svnroot/sdcc/trunk/sdcc@1713 4a8a32a2-be11-0410-ad9d-d568d2c75423 --- diff --git a/src/SDCCsymt.c b/src/SDCCsymt.c index 47cf210b..5592d4a9 100644 --- a/src/SDCCsymt.c +++ b/src/SDCCsymt.c @@ -1181,8 +1181,10 @@ checkSClass (symbol * sym, int isProto) SPEC_VOLATILE (sym->etype) = 1; /* global variables declared const put into code */ + /* if no other storage class specified */ if (sym->level == 0 && - SPEC_CONST (sym->etype)) { + SPEC_CONST (sym->etype) && + SPEC_SCLS(sym->etype) == S_FIXED) { SPEC_SCLS (sym->etype) = S_CODE; }