View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0031691 | FPC | FCL | public | 2017-04-20 22:44 | 2017-04-21 21:26 |
Reporter | Andrey Zubarev | Assigned To | Michael Van Canneyt | ||
Priority | normal | Severity | minor | Reproducibility | have not tried |
Status | closed | Resolution | fixed | ||
Product Version | Product Build | ||||
Target Version | 3.2.0 | Fixed in Version | 3.1.1 | ||
Summary | 0031691: fcl-passsrc error | ||||
Description | Parser 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" | ||||
Tags | No tags attached. | ||||
Fixed in Revision | 35876 | ||||
FPCOldBugId | |||||
FPCTarget | |||||
Attached Files |
|
|
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) ? |
|
>>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'); |
|
I thought that was going to be it :) Fixed, thanks for reporting and testing ! |
|
Thanks! |
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 |