* src/hc08/gen.c (emitinline): fixed bug #1029778
authorepetrich <epetrich@4a8a32a2-be11-0410-ad9d-d568d2c75423>
Sat, 18 Sep 2004 03:07:25 +0000 (03:07 +0000)
committerepetrich <epetrich@4a8a32a2-be11-0410-ad9d-d568d2c75423>
Sat, 18 Sep 2004 03:07:25 +0000 (03:07 +0000)
* src/SDCC.y (assignment_expr): fixed the grammer so that assignment
to a cast object is no longer a syntax error ("fixes" bug #1030006,
and starts toward RFE #905167)

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

ChangeLog
src/SDCC.y
src/hc08/gen.c

index 7fcc0a423ff391da3da280d9248295a0ab62fe47..60fae42589d82bfcfbeaec588e07fc2e3291f7d6 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2004-09-18 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
+
+       * src/hc08/gen.c (emitinline): fixed bug #1029778
+       * src/SDCC.y (assignment_expr): fixed the grammer so that assignment
+       to a cast object is no longer a syntax error ("fixes" bug #1030006,
+       and starts toward RFE #905167)
+
 2004-09-17 Vangelis Rokas <vrokas AT otenet.gr>
 
        * src/pic16/gen.c (mov2f): New function to move an operand to
index 77182a48ce2a822077a23e66d38bf34aecf758f3..d2aaedc06d2a7bf541069f820b42ae72d16e8619 100644 (file)
@@ -401,7 +401,7 @@ conditional_expr
 
 assignment_expr
    : conditional_expr
-   | unary_expr assignment_operator assignment_expr   
+   | cast_expr assignment_operator assignment_expr   
                      { 
                                 
                             switch ($2) {
index 75a1f85ceb8e02f32405d2cd7884c3a9b141397e..593a66829ff8391676fbc119d5491380e23b0a01 100644 (file)
@@ -5265,7 +5265,7 @@ emitinline (iCode * ic, char *inlin)
               if (*l=='#')
                 l++;
               sym->isref = 1;
-              if (!sym->allocreq && !sym->ismyparm)
+              if (sym->level && !sym->allocreq && !sym->ismyparm)
                 {
                   werror (E_ID_UNDEF, sym->name);
                   werror (W_CONTINUE,