Bugfix: no #line dir with 0 generated
This commit is contained in:
parent
3bc821aa5c
commit
5f2d930a54
7 changed files with 15 additions and 16 deletions
|
|
@ -17,7 +17,7 @@ proc genLineDir(p: BProc, t: PNode) =
|
|||
var line = toLinenumber(t.info) # BUGFIX
|
||||
if line < 0:
|
||||
line = 0 # negative numbers are not allowed in #line
|
||||
if optLineDir in p.Options:
|
||||
if optLineDir in p.Options and line > 0:
|
||||
appff(p.s[cpsStmts], "#line $2 \"$1\"$n", "; line $2 \"$1\"$n",
|
||||
[toRope(toFilename(t.info)), toRope(line)])
|
||||
if ({optStackTrace, optEndb} * p.Options == {optStackTrace, optEndb}) and
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue