From 2281a9a782a42a170102c4baa9c27d4ac31d5aa7 Mon Sep 17 00:00:00 2001 From: epetrich Date: Sat, 18 Sep 2004 03:07:25 +0000 Subject: [PATCH] * 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) git-svn-id: https://sdcc.svn.sourceforge.net/svnroot/sdcc/trunk/sdcc@3500 4a8a32a2-be11-0410-ad9d-d568d2c75423 --- ChangeLog | 7 +++++++ src/SDCC.y | 2 +- src/hc08/gen.c | 2 +- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 7fcc0a42..60fae425 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2004-09-18 Erik Petrich + + * 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 * src/pic16/gen.c (mov2f): New function to move an operand to diff --git a/src/SDCC.y b/src/SDCC.y index 77182a48..d2aaedc0 100644 --- a/src/SDCC.y +++ b/src/SDCC.y @@ -401,7 +401,7 @@ conditional_expr assignment_expr : conditional_expr - | unary_expr assignment_operator assignment_expr + | cast_expr assignment_operator assignment_expr { switch ($2) { diff --git a/src/hc08/gen.c b/src/hc08/gen.c index 75a1f85c..593a6682 100644 --- a/src/hc08/gen.c +++ b/src/hc08/gen.c @@ -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, -- 2.30.2