* src/SDCC.y: applied patch
authorborutr <borutr@4a8a32a2-be11-0410-ad9d-d568d2c75423>
Sun, 24 Aug 2008 06:52:39 +0000 (06:52 +0000)
committerborutr <borutr@4a8a32a2-be11-0410-ad9d-d568d2c75423>
Sun, 24 Aug 2008 06:52:39 +0000 (06:52 +0000)
  1963382: Listing File - C file comment is incorrect
  thanks to Serge Malo

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

ChangeLog
src/SDCC.y

index 8aea57389515cd165e8c5566b7ebecef0c129614..dd3285c36afa6a2384f7f82d8cd05bb50d156f2a 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2008-08-24 Borut Razem <borut.razem AT siol.net>
+
+       * src/SDCC.y: applied patch
+         1963382: Listing File - C file comment is incorrect
+         thanks to Serge Malo
+
 2008-08-23 Borut Razem <borut.razem AT siol.net>
 
        * src/pic16/gen.c: applied patch
index ef699343deb1ebe5302611cea4e5998e94659c74..d162cc84583694afc41bfa86a4dbff42b765eea1 100644 (file)
@@ -1550,6 +1550,8 @@ selection_statement
                            {
                               noLineno++ ;
                               $$ = createIf ($3, $6, $7 );
+                              $$->lineno = $3->lineno;
+                              $$->filename = $3->filename;
                               noLineno--;
                            }
    | SWITCH '(' expr ')'   {
@@ -1630,7 +1632,8 @@ iteration_statement
                            noLineno++ ;
                            $$ = createWhile ( $1, STACK_POP(continueStack),
                                               STACK_POP(breakStack), $3, $6 );
-                           $$->lineno = $1->lineDef ;
+                           $$->lineno = $1->lineDef;
+                           $$->filename = $1->fileDef;
                            noLineno-- ;
                          }
    | do statement   WHILE '(' expr ')' ';'
@@ -1639,7 +1642,8 @@ iteration_statement
                           noLineno++ ;
                           $$ = createDo ( $1 , STACK_POP(continueStack),
                                           STACK_POP(breakStack), $5, $2);
-                          $$->lineno = $1->lineDef ;
+                          $$->lineno = $1->lineDef;
+                          $$->filename = $1->fileDef;
                           noLineno-- ;
                         }
    | for '(' expr_opt   ';' expr_opt ';' expr_opt ')'  statement