diff --git a/Scanner.pas b/Scanner.pas index 9b9be0e..3cf4c5f 100644 --- a/Scanner.pas +++ b/Scanner.pas @@ -2164,6 +2164,7 @@ if gotName then begin {read the file name from the line} oldincludeFileGS := includeFileGS; {set the file name} includeFileGS.theString.theString := workString; includeFileGS.theString.size := length(workString); + sourceFileGS := includeFileGS; ReadFile; {read the file} chPtr := bofPtr; {set the start, end pointers} eofPtr := pointer(ord4(bofPtr)+ffDCBGS.fileLength); diff --git a/cc.notes b/cc.notes index a160030..fc2de67 100644 --- a/cc.notes +++ b/cc.notes @@ -1731,6 +1731,8 @@ int foo(int[42]); (Devin Reade) +177. The name of the current source file was not updated when processing an #include or #append. As a result, uses of the __FILE__ macro within an include file would not give the name of that file, and functions within an include file would not have the proper file name recorded in their debugging information. + -- Bugs from C 2.1.0 that have been fixed ----------------------------------- 1. In some situations, fread() reread the first 1K or so of the file.