Skip to content

Commit 7418945

Browse files
committed
fix a problem with debug statement line numbers for errors/warnings
1 parent efbd321 commit 7418945

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

Changelog.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Version 7.0.4
2-
- Fixed lseek() return mismatch
32
- Fixed an issue with casting to different size in nucode
3+
- Fixed incorrect line info in some DEBUG statements
44

55
Version 7.0.3
66
- Fixed .fpide search so file names are relative to the .fpide file

frontends/printdebug.c

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -142,6 +142,10 @@ CreatePrintfDebug(AST *exprlist, AST *dbgmask)
142142
return NULL;
143143
}
144144
}
145+
146+
ASTReportInfo save;
147+
AstReportAs(exprlist, &save);
148+
145149
flexbuf_init(&fb, 1024);
146150

147151
if (exprlist && exprlist->left && exprlist->left->kind == AST_LABEL) {
@@ -186,5 +190,8 @@ CreatePrintfDebug(AST *exprlist, AST *dbgmask)
186190
outlist = AddToList(sub, outlist);
187191
printf_call = NewAST(AST_PRINT, NULL, NULL);
188192
printf_call = NewAST(AST_FUNCCALL, printf_call, outlist);
193+
194+
AstReportDone(&save);
195+
189196
return genPrintf(printf_call);
190197
}

0 commit comments

Comments
 (0)