Save #pragma path directives in sym files.

They were not being saved, which would result in ORCA/C not searching the proper paths when looking for an include file after the sym file had ended. Here is an example showing the problem:

#pragma path "include"
#include <stdio.h>
int k = 50;
#include "n.h" /* will not find include:n.h */
This commit is contained in:
Stephen Heumann 2022-02-15 21:21:18 -06:00
parent 30fcc7227f
commit f2d6625300
2 changed files with 4 additions and 1 deletions

View File

@ -3251,6 +3251,7 @@ if ch in ['a','d','e','i','l','p','u','w'] then begin
Error(11);
end {else if}
else if token.name^ = 'path' then begin
FlagPragmas(p_path);
NextToken;
if token.kind = stringConst then begin
LongToPString(workString, token.sval);

View File

@ -1776,12 +1776,14 @@ int foo(int[42]);
178. Keep names specified via the KEEP= portion of the command line or the {KeepName} shell variable could sometimes be saved in the .sym file and applied to subsequent compilations, even if they were no longer specified for the later compilation. Also, if a .sym file was used, the keep name specified via #pragma keep might override the one specified on the command line or via {KeepName}.
179. Macro definitions or header search paths specified via the cc= portion of the command line could be saved in the .sym file and applied to subsequent compilations, even if they were no longer specified on the command line.
179. Macro definitions specified via the cc= portion of the command line could be saved in the .sym file and applied to subsequent compilations, even if they were no longer specified on the command line.
180. Certain #undef directives might be ignored when using a .sym file.
181. #pragma expand might not work correctly when used in certain places.
182. #pragma path directives were not saved in .sym files. This could cause ORCA/C not to search the proper paths for include files that were not represented in the .sym file (e.g. because they were included after a function).
-- Bugs from C 2.1.0 that have been fixed -----------------------------------
1. In some situations, fread() reread the first 1K or so of the file.