Forum > Other

val() converts wrong on arm-linux

(1/1)

Ocye:
With latest svn update my ppcrossarm compiler (?) seems to be buggy. Val() is used in TiniFile.ReadFloat() which I use in my code. On x86_64 (and formerly on arm as well) it runs without any trouble.


--- Code: ---var
  test:extended;
  e:integer;
begin
  val('123456.789',test,e);
  writeln(test);
  writeln(strtofloat('123456.789'));
  writeln(floattostr(123456.789));
end;
--- End code ---


--- Quote ---1.11111111000000E+006
1.11111111000000E+006
123456.789

--- End quote ---

English locale on arm (DecimalSeparator='.', ThousandSeparator=',')
Lazarus 0.9.29 (r27586M)
FPC 2.5.1 (16089)
make crosszipinstall CPU_TARGET=arm OS_TARGET=linux OPT="-dFPC_ARMEL" CROSSOPT="-dFPC_ARMEL -CfSOFT -Cparmv5"

Ocye:
With an older svn (svn checkout -r15800 http://svn.freepascal.org/svn/fpc/trunk fpc) all works well. Is it necessary to post the issue on the bug tracker?

Leledumbo:
Yes, please do it. The developers will then decide whether it's really a bug or not. Not all FPC developers are lazarian as well.

Ocye:
http://bugs.freepascal.org/view.php?id=17590

Navigation

[0] Message Index

Go to full version