Article View: borland.public.cppbuilder.nativeapi
Article #7774Re: Erratic code for float constants (BCB5)
From: Eelke
Date: Tue, 28 Dec 2004 07:45
Date: Tue, 28 Dec 2004 07:45
41 lines
2323 bytes
2323 bytes
Sorry for the previous empty post. AlexB wrote: > Hi all! > > Maybe off topic for API-NG but I see no special group for "compilers"... I think you should have posted in the language group. > ---------------------------------------------------------------------- > 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? Have you installed all updates? On the advanced compiler tab in your project options is a setting for fast math try changing it. Try changing the CPU type. Eelke
Technical Details
Message-ID:
<41d10f1e$1@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news4.google.com!news.glorb.com!border1.nntp.dca.giganews.com!nntp.giganews.com!newshosting.com!nx01.iad01.newshosting.com!news-peer0-test!news-peer-test!btnet!newsfeed.bt.es!caladan.landsraad.net!newsgroups.borland.com!not-for-mailReferences:
<41d1056e@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Thread: 10cc67,a17d60f4a27b7be4 X-Google-Attributes: gid10cc67,public X-Google-Language: ENGLISH,ASCII-7-bit Date: Tue, 28 Dec 2004 08:45:04 +0100 From: Eelke <e.klein@mplussoftware.nl> User-Agent: Mozilla Thunderbird 1.0 (Windows/20041206) X-Accept-Language: en-us, en MIME-Version: 1.0 Newsgroups: borland.public.cppbuilder.nativeapi Subject: Re: Erratic code for float constants (BCB5) References: <41d1056e@newsgroups.borland.com> In-Reply-To: <41d1056e@newsgroups.borland.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit NNTP-Posting-Host: 81.58.1.162 Message-ID: <41d10f1e$1@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1104219934 81.58.1.162 (27 Dec 2004 23:45:34 -0800) Lines: 41 Path: arc1-ca.pugleaf.net!g2news1.google.com!news4.google.com!news.glorb.com!border1.nntp.dca.giganews.com!nntp.giganews.com!newshosting.com!nx01.iad01.newshosting.com!news-peer0-test!news-peer-test!btnet!newsfeed.bt.es!caladan.landsraad.net!newsgroups.borland.com!not-for-mail