From 0ff6ce0835504fa885ced47af2fd721d4d814d43 Mon Sep 17 00:00:00 2001 From: sandeep Date: Wed, 19 Dec 2001 05:10:46 +0000 Subject: [PATCH] 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 --- src/SDCCsymt.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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; } -- 2.47.2