Recent

Author Topic: val() converts wrong on arm-linux  (Read 6764 times)

Ocye

  • Hero Member
  • *****
  • Posts: 518
    • Scrabble3D
val() converts wrong on arm-linux
« on: October 07, 2010, 09:43:59 pm »
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: [Select]
var
  test:extended;
  e:integer;
begin
  val('123456.789',test,e);
  writeln(test);
  writeln(strtofloat('123456.789'));
  writeln(floattostr(123456.789));
end;

Quote
1.11111111000000E+006
1.11111111000000E+006
123456.789

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"
Lazarus 1.7 (SVN) FPC 3.0.0

Ocye

  • Hero Member
  • *****
  • Posts: 518
    • Scrabble3D
Re: val() converts wrong on arm-linux
« Reply #1 on: October 08, 2010, 10:17:30 pm »
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?
Lazarus 1.7 (SVN) FPC 3.0.0

Leledumbo

  • Hero Member
  • *****
  • Posts: 8103
  • Programming + Glam Metal + Tae Kwon Do = Me
Re: val() converts wrong on arm-linux
« Reply #2 on: October 09, 2010, 06:18:23 am »
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

  • Hero Member
  • *****
  • Posts: 518
    • Scrabble3D
Lazarus 1.7 (SVN) FPC 3.0.0