🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.cppbuilder.nativeapi
Article #7772

Erratic code for float constants (BCB5)

#7772
From: AlexB
Date: Tue, 28 Dec 2004 07:04
32 lines
1870 bytes
Hi all!

Maybe off topic for API-NG but I see no special group for "compilers"...
----------------------------------------------------------------------
Some days ago I've run into an strange obstacle.
BCB5 compiler from time to time generates invalid addresses for float 
constants like this:

  Controller->Lamp[n++]=1.27*tbFace->Position;

    CPU:
    // load tbFace->Position
    mov edx,[ebp-0x2c]
    mov ecx,[edx+0x450]
    fild dword ptr [ecx+0x210]
    // Is it "1.27" ???
    // No, it's the address of next function in source file !!!
    fmul qword ptr [TfrmFaceCalibr::btnSaveImageClick(const 
System::TObject *)]
    // Float to int
    call CC3250MT.__ftol
    ...

Remakeing/rebuilding inside IDE has no effect, the only way is "make -B" 
from command line...

The project is not so big (~500 kB of src in ~100 files). This problem 
has arisen some days ago and I had no such issue never before.

Any suggestion?

AlexB.
Technical Details
Message-ID: <41d1056e@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!proxad.net!gatel-ffm!gatel-ffm!194.25.134.126.MISMATCH!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail

Show Full Headers
Complete Article Headers
X-Google-Thread: 10cc67,a17d60f4a27b7be4,start
X-Google-Attributes: gid10cc67,public
X-Google-Language: ENGLISH,ASCII-7-bit
Date: Tue, 28 Dec 2004 13:04:21 +0600
From: AlexB <b.a.v@inbox.ru>
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.2) Gecko/20040804 Netscape/7.2 (ax)
X-Accept-Language: ru, en-us, en
MIME-Version: 1.0
Newsgroups: borland.public.cppbuilder.nativeapi
Subject: Erratic code for float constants (BCB5)
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit
NNTP-Posting-Host: 212.192.185.54
Message-ID: <41d1056e@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1104217454 212.192.185.54 (27 Dec 2004 23:04:14 -0800)
Lines: 32
Path: arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!proxad.net!gatel-ffm!gatel-ffm!194.25.134.126.MISMATCH!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail