mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-14 07:59:27 +02:00
* mark constant symbols used in preprocessor expressions as used, resolves #40108
This commit is contained in:
parent
84e7a17b67
commit
8ef0f59025
@ -2134,11 +2134,13 @@ type
|
||||
begin
|
||||
result.free;
|
||||
result:=texprvalue.create_const(tconstsym(srsym));
|
||||
tconstsym(srsym).IncRefCount;
|
||||
end;
|
||||
enumsym:
|
||||
begin
|
||||
result.free;
|
||||
result:=texprvalue.create_int(tenumsym(srsym).value);
|
||||
// tconstsym(srsym).IncRefCount;
|
||||
end;
|
||||
else
|
||||
;
|
||||
|
14
tests/webtbs/tw40108.pp
Normal file
14
tests/webtbs/tw40108.pp
Normal file
@ -0,0 +1,14 @@
|
||||
{ %opt=-Seh }
|
||||
{ %norun }
|
||||
program test;
|
||||
|
||||
const
|
||||
TheVersion = 1;
|
||||
|
||||
begin
|
||||
{$if TheVersion >= 1}
|
||||
writeln('Version 1 or higher');
|
||||
{$else}
|
||||
writeln('Version < 1');
|
||||
{$endif}
|
||||
end.
|
Loading…
Reference in New Issue
Block a user