fixed
authorjohanknol <johanknol@4a8a32a2-be11-0410-ad9d-d568d2c75423>
Mon, 4 Mar 2002 15:58:12 +0000 (15:58 +0000)
committerjohanknol <johanknol@4a8a32a2-be11-0410-ad9d-d568d2c75423>
Mon, 4 Mar 2002 15:58:12 +0000 (15:58 +0000)
const unsigned char arr[][2] = { { 0, 1 } };
t18.c:1: error: Initializer element is not constant

git-svn-id: https://sdcc.svn.sourceforge.net/svnroot/sdcc/trunk/sdcc@1991 4a8a32a2-be11-0410-ad9d-d568d2c75423

src/SDCCval.c

index e861392109534e828725b1876aff65189ed4483f..02172a723a5688fd649c822f3c7cb2eca4507977 100644 (file)
@@ -1457,7 +1457,7 @@ getNelements (sym_link * type, initList * ilist)
   if (!ilist)
     return 0;
 
-  if (ilist->type == INIT_DEEP)
+  while (ilist->type == INIT_DEEP)
     ilist = ilist->init.deep;
 
   /* if type is a character array and there is only one