View Issue Details

IDProjectCategoryView StatusLast Update
0019274LazarusIDEpublic2011-05-01 20:10
ReporterStephanoAssigned ToMartin Friebe 
PrioritynormalSeverityblockReproducibilityalways
Status closedResolutionfixed 
Product Version0.9.31 (SVN)Product Build 
Target VersionFixed in Version0.9.31 (SVN) 
Summary0019274: Cannot rebuild IDE
DescriptionIDE does not compile successfully due to Max method overload uncertainty:

NewRange.RangeEndAddr := Max(OrigLastAddress.Value, AFirstAddr.Value+1);

Compile succeeds if it is changed to:
NewRange.RangeEndAddr := Max(OrigLastAddress.Value, Cardinal(AFirstAddr.Value+1));

Lazarus 0.9.31 r30515M FPC 2.5.1 i386-linux-gtk 2
TagsNo tags attached.
Fixed in Revision30159
LazTarget0.99.0
Widgetset
Attached Files

Activities

Juha Manninen

2011-05-01 18:13

developer   ~0047951

Casting to Cardinal() may chop data. The right solution would be to make an overloaded version of "Max":

function Max(a, b: QWord): QWord; inline; overload;

FPC devels, anyone?

Martin Friebe

2011-05-01 19:03

manager   ~0047955

Fixed

Stephano

2011-05-01 20:10

developer   ~0047959

@Juha,
I mentioned cardinal just to show where the problem lies. That was maybe misleading.

Of course cardinal is 32 bits while Qword is 64 bits.

Issue History

Date Modified Username Field Change
2011-05-01 16:49 Stephano New Issue
2011-05-01 18:13 Juha Manninen Note Added: 0047951
2011-05-01 19:03 Martin Friebe Status new => assigned
2011-05-01 19:03 Martin Friebe Assigned To => Martin Friebe
2011-05-01 19:03 Martin Friebe Fixed in Revision => 30159
2011-05-01 19:03 Martin Friebe LazTarget => 0.99.0
2011-05-01 19:03 Martin Friebe Status assigned => resolved
2011-05-01 19:03 Martin Friebe Fixed in Version => 0.9.31 (SVN)
2011-05-01 19:03 Martin Friebe Resolution open => fixed
2011-05-01 19:03 Martin Friebe Note Added: 0047955
2011-05-01 19:04 Martin Friebe Target Version => 0.99.0
2011-05-01 20:10 Stephano Note Added: 0047959
2011-05-01 20:10 Stephano Status resolved => closed