Fix line numbering via #line when using a .sym file.

The line numbering would be off by one in this case.
This commit is contained in:
Stephen Heumann 2022-10-22 21:56:16 -05:00
parent 65ec29ee3e
commit e3a3548443
2 changed files with 3 additions and 1 deletions

View File

@ -1456,7 +1456,7 @@ var
end;
p_line: begin
lineNumber := ReadLong;
lineNumber := ReadLong - 1;
lsPtr := ReadLongString;
sourceFileGS.theString.size := lsPtr^.length;
for i := 1 to sourceFileGS.theString.size do

View File

@ -1942,6 +1942,8 @@ int foo(int[42]);
213. If a floating-point constant beginning with . had a line continuation between the . and the first digit, a spurious error would be reported.
214. If the #line directive was used, line numbering would be off by one when using a .sym file.
-- Bugs from C 2.1.0 that have been fixed -----------------------------------
1. In some situations, fread() reread the first 1K or so of the file.