Revert revisions 36133, 36128 from trunk.

git-svn-id: trunk@36436 -
This commit is contained in:
maciej-izak 2017-06-06 07:12:26 +00:00
parent 1e85730f67
commit d3d29fa84c
5 changed files with 1 additions and 54 deletions

2
.gitattributes vendored
View File

@ -15558,7 +15558,6 @@ tests/webtbs/tw3160b.pp svneol=native#text/plain
tests/webtbs/tw3160c.pp svneol=native#text/plain
tests/webtbs/tw3161.pp svneol=native#text/plain
tests/webtbs/tw3165.pp svneol=native#text/plain
tests/webtbs/tw31675.pp svneol=native#text/pascal
tests/webtbs/tw3168.pp svneol=native#text/plain
tests/webtbs/tw3170.pp svneol=native#text/plain
tests/webtbs/tw3172.pp svneol=native#text/plain
@ -16222,7 +16221,6 @@ tests/webtbs/uw2956.pp svneol=native#text/plain
tests/webtbs/uw2984.pp svneol=native#text/plain
tests/webtbs/uw3103.pp svneol=native#text/plain
tests/webtbs/uw31431.pp svneol=native#text/pascal
tests/webtbs/uw31675.pp svneol=native#text/pascal
tests/webtbs/uw3179a.pp svneol=native#text/plain
tests/webtbs/uw3179b.pp svneol=native#text/plain
tests/webtbs/uw3184a.pp svneol=native#text/plain

View File

@ -143,9 +143,6 @@ interface
preproc_pattern : string;
preproc_token : ttoken;
{ true, if we are parsing preprocessor expressions }
in_preproc_comp_expr : boolean;
constructor Create(const fn:string; is_macro: boolean = false);
destructor Destroy;override;
{ File buffer things }
@ -2120,12 +2117,10 @@ type
end;
begin
current_scanner.in_preproc_comp_expr:=true;
current_scanner.skipspace;
{ start preproc expression scanner }
current_scanner.preproc_token:=current_scanner.readpreproc;
preproc_comp_expr:=preproc_sub_expr(opcompare,true);
current_scanner.in_preproc_comp_expr:=false;
end;
function boolean_compile_time_expr(var valuedescr: string): Boolean;

View File

@ -459,9 +459,7 @@ implementation
{ codegen }
procinfo,
{ ppu }
entfile,
{ parser }
scanner
entfile
;
@ -2797,12 +2795,6 @@ implementation
var
owner: tsymtable;
begin
{ for symbols used in preprocessor expressions, we don't want to
increase references count (for smaller final binaries) }
if not assigned(current_scanner) then
internalerror(2017050601);
if current_scanner.in_preproc_comp_expr then
exit;
{ symbol uses count }
sym.IncRefCount;
owner:=sym.owner;

View File

@ -1,25 +0,0 @@
{ %opt=-gh }
program tw31675;
{$mode objfpc}{$H+}
uses
Classes,
{$if declared(useheaptrace)}
uw31675,
{$endif}
SysUtils
;
var
i: Boolean = false;
begin
{$if declared(foo)}
i := true;
{$endif}
if not i then
Halt(1);
WriteLn('ok');
end.

View File

@ -1,13 +0,0 @@
unit uw31675;
{$MODE DELPHI}
interface
var
foo: boolean;
implementation
end.