From aa3900497128ed55964c8cf7087cb0891873807f Mon Sep 17 00:00:00 2001 From: borutr Date: Sun, 24 Aug 2008 06:52:39 +0000 Subject: [PATCH] * src/SDCC.y: applied patch 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 | 6 ++++++ src/SDCC.y | 8 ++++++-- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 8aea5738..dd3285c3 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2008-08-24 Borut Razem + + * src/SDCC.y: applied patch + 1963382: Listing File - C file comment is incorrect + thanks to Serge Malo + 2008-08-23 Borut Razem * src/pic16/gen.c: applied patch diff --git a/src/SDCC.y b/src/SDCC.y index ef699343..d162cc84 100644 --- a/src/SDCC.y +++ b/src/SDCC.y @@ -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 -- 2.30.2