From: epetrich Date: Thu, 18 Sep 2003 15:00:43 +0000 (+0000) Subject: * src/SDCCsymt.c (structElemType): fixed bug #808291 (members X-Git-Url: https://git.gag.com/?a=commitdiff_plain;h=855fb20becd989504cef449dd60983ff5958a2af;p=fw%2Fsdcc * src/SDCCsymt.c (structElemType): fixed bug #808291 (members of const struct should be treated as if const themselves) git-svn-id: https://sdcc.svn.sourceforge.net/svnroot/sdcc/trunk/sdcc@2897 4a8a32a2-be11-0410-ad9d-d568d2c75423 --- diff --git a/ChangeLog b/ChangeLog index 5c211d47..5bc2d441 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2003-09-18 Erik Petrich + + * src/SDCCsymt.c (structElemType): fixed bug #808291 (members + of const struct should be treated as if const themselves) + 2003-09-18 Bernhard Held * src/SDCCval.c (valPlus, valMinus): fixed bug #808337 diff --git a/src/SDCCsymt.c b/src/SDCCsymt.c index 5f538398..48a558fd 100644 --- a/src/SDCCsymt.c +++ b/src/SDCCsymt.c @@ -1048,6 +1048,10 @@ structElemType (sym_link * stype, value * id) etype = getSpec (type); SPEC_SCLS (etype) = (SPEC_SCLS (petype) == S_REGISTER ? SPEC_SCLS (etype) : SPEC_SCLS (petype)); + if (IS_SPEC (type)) + SPEC_CONST (type) |= SPEC_CONST (stype); + else + DCL_PTR_CONST (type) |= SPEC_CONST (stype); return type; } fields = fields->next;