View Issue Details

IDProjectCategoryView StatusLast Update
0031691FPCFCLpublic2017-04-21 21:26
ReporterAndrey ZubarevAssigned ToMichael Van Canneyt 
PrioritynormalSeverityminorReproducibilityhave not tried
Status closedResolutionfixed 
Product VersionProduct Build 
Target Version3.2.0Fixed in Version3.1.1 
Summary0031691: fcl-passsrc error
DescriptionParser options: -dLINUX -dFPC -dCPU64 -dLCLQT5

program Project1;
{$MODE DELPHI}
function TJclPropInfo.GetSpecValue(const Value: TJclAddr): TJclAddr;
begin
  case GetSpecKind(Value) of
    pskStaticMethod, pskConstant:
      Result := Value;
    pskVirtualMethod:
      {$IFDEF CPU32}
      Result := Value and $0000FFFF;
      {$ENDIF CPU32}
      {$IFDEF CPU64}
      Result := Value and $0000FFFFFFFFFFFF;
      {$ENDIF CPU64}
    pskField:
      {$IFDEF CPU32}
      Result := Value and $00FFFFFF;
      {$ENDIF CPU32}
      {$IFDEF CPU64}
      Result := Value and $00FFFFFFFFFFFFFF;
      {$ENDIF CPU64}
  else
    Result := 0;
  end;
end;
begin
end.

gives Parser error: "Expected "," at token ":=" in file /home/zamtmn/SharedEXT4/hdd/src/my/zcad/other/pudgb/passrcerrors.pas at line 13 column 15"
TagsNo tags attached.
Fixed in Revision35876
FPCOldBugId
FPCTarget
Attached Files

Activities

Michael Van Canneyt

2017-04-20 23:33

administrator   ~0099721

The parser by default defines the CPU of the OS you are on. So if you are on 32-bit, both CPU32 and CPU64 will be defined.

Can you try creating the parser manually (so do not use parsesource) ?

Andrey Zubarev

2017-04-21 06:05

reporter   ~0099724

>>so do not use parsesource
Yes, problem in parsesource procedure, UpperCase(CPUTarget) compare with lovercase string

Index: packages/fcl-passrc/src/pparser.pp
===================================================================
--- packages/fcl-passrc/src/pparser.pp (revision 35856)
+++ packages/fcl-passrc/src/pparser.pp (working copy)
@@ -595,7 +595,7 @@
     // TargetCPU
     s := UpperCase(CPUTarget);
     Scanner.AddDefine('CPU'+s);
- if (s='x86_64') then
+ if (s='X86_64') then
       Scanner.AddDefine('CPU64')
     else
       Scanner.AddDefine('CPU32');

Michael Van Canneyt

2017-04-21 20:42

administrator   ~0099740

I thought that was going to be it :)

Fixed, thanks for reporting and testing !

Andrey Zubarev

2017-04-21 21:26

reporter   ~0099744

Thanks!

Issue History

Date Modified Username Field Change
2017-04-20 22:44 Andrey Zubarev New Issue
2017-04-20 23:29 Michael Van Canneyt Assigned To => Michael Van Canneyt
2017-04-20 23:29 Michael Van Canneyt Status new => assigned
2017-04-20 23:33 Michael Van Canneyt Note Added: 0099721
2017-04-21 06:05 Andrey Zubarev Note Added: 0099724
2017-04-21 20:42 Michael Van Canneyt Fixed in Revision => 35876
2017-04-21 20:42 Michael Van Canneyt Note Added: 0099740
2017-04-21 20:42 Michael Van Canneyt Status assigned => resolved
2017-04-21 20:42 Michael Van Canneyt Fixed in Version => 3.1.1
2017-04-21 20:42 Michael Van Canneyt Resolution open => fixed
2017-04-21 20:42 Michael Van Canneyt Target Version => 3.2.0
2017-04-21 21:26 Andrey Zubarev Note Added: 0099744
2017-04-21 21:26 Andrey Zubarev Status resolved => closed