Fixed an error: When determining where to place initialized data, the compiler
didn't look "deep enough" into nested arrays to determine the constness correctly. git-svn-id: svn://svn.cc65.org/cc65/trunk@5622 b7a2c559-68d2-44c3-8de9-860c34a00d81
This commit is contained in:
@@ -6,7 +6,7 @@
|
||||
/* */
|
||||
/* */
|
||||
/* */
|
||||
/* (C) 2000-2009, Ullrich von Bassewitz */
|
||||
/* (C) 2000-2012, Ullrich von Bassewitz */
|
||||
/* Roemerstrasse 52 */
|
||||
/* D-70794 Filderstadt */
|
||||
/* EMail: uz@cc65.org */
|
||||
@@ -93,7 +93,7 @@ static void Parse (void)
|
||||
|
||||
/* Disallow ASM statements on global level */
|
||||
if (CurTok.Tok == TOK_ASM) {
|
||||
Error ("__asm__ is not allowed here");
|
||||
Error ("__asm__ is not allowed here");
|
||||
/* Parse and remove the statement for error recovery */
|
||||
AsmStatement ();
|
||||
ConsumeSemi ();
|
||||
@@ -209,9 +209,7 @@ static void Parse (void)
|
||||
* the element qualifiers, since not the array but its
|
||||
* elements are const.
|
||||
*/
|
||||
if (IsQualConst (Decl.Type) ||
|
||||
(IsTypeArray (Decl.Type) &&
|
||||
IsQualConst (GetElementType (Decl.Type)))) {
|
||||
if (IsQualConst (GetBaseElementType (Decl.Type))) {
|
||||
g_userodata ();
|
||||
} else {
|
||||
g_usedata ();
|
||||
|
||||
Reference in New Issue
Block a user