fixed access to array of structures
authorbernhardheld <bernhardheld@4a8a32a2-be11-0410-ad9d-d568d2c75423>
Thu, 18 Jul 2002 10:59:07 +0000 (10:59 +0000)
committerbernhardheld <bernhardheld@4a8a32a2-be11-0410-ad9d-d568d2c75423>
Thu, 18 Jul 2002 10:59:07 +0000 (10:59 +0000)
git-svn-id: https://sdcc.svn.sourceforge.net/svnroot/sdcc/trunk/sdcc@2040 4a8a32a2-be11-0410-ad9d-d568d2c75423

ChangeLog
src/SDCCast.c

index 79c96134d38bb6d3bbd232780e37f3809c3d04c2..b5f66ec3ce1d1c2ba9b96085d6f33cda02b0429e 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,6 @@
+2002-07-18  Bernhard Held <bernhard@bernhardheld.de>
+       * src/SDCCast.c (decorateType): fixed access to array of structures http://sourceforge.net/mailarchive/forum.php?thread_id=902690&forum_id=4107
+
 2002-06-22  Scott Dattalo <scott@dattalo.com>
        * src/pic/*: Numerous bug fixes. Flow analysis has been enhanced. 
        - Rewrote the register banking algorithm. 
index 61c5655bf6be7dfee42c8ba9522d618a664c23b9..bb6614c9a9b3f79c1e9f20a38188ca2b0726a7db 100644 (file)
@@ -2045,7 +2045,7 @@ decorateType (ast * tree)
       /*----------------------------*/
     case PTR_OP:
       /* if not pointer to a structure */
-      if (!IS_PTR (LTYPE (tree)))
+      if (!IS_PTR (LTYPE (tree)) && !IS_ARRAY (LTYPE(tree)))
        {
          werror (E_PTR_REQD);
          goto errorTreeReturn;