Thomas Ward <[EMAIL PROTECTED]> wrote:
> s[0] = '4';
> d = (double) (s[0] - '0');
> HostTraceOutputTL(appErrorClass, "Number is %ld", (Int32) d);
>
> StrCopy(s, "4");
> d = (double) (s[0] - '0');
> HostTraceOutputTL(appErrorClass, "Number is %ld", (Int32) d);
>
> The output from these statements is:
>
> Number is 4
> Number is 0
>
> How can the results be different?
Because the optimizer does the first one at compile time, leaving the
second to be done at run time by a broken library function. Fortunately
this was fixed nine months ago; see
http://www.escribe.com/computing/pcpqa/m25778.html
John
--
For information on using the Palm Developer Forums, or to unsubscribe, please see
http://www.palmos.com/dev/tech/support/forums/
- GCC Compiler Bug? (Or am I just losing my mind?) Thomas Ward
- Re: GCC Compiler Bug? (Or am I just losing my mind?) John Marshall
- Re: GCC Compiler Bug? (Or am I just losing my mind?) Igor Mozolevsky
- Re: GCC Compiler Bug? (Or am I just losing my mind?) krollin
- Re: GCC Compiler Bug? (Or am I just losing my mind?) Thomas Ward
- Re: GCC Compiler Bug? (Or am I just losing my mind?) krollin
- Re: GCC Compiler Bug? (Or am I just losing my mind?) Igor Mozolevsky
- Re: GCC Compiler Bug? (Or am I just losing my mind?) Igor Mozolevsky
- Re: GCC Compiler Bug? (Or am I just losing my mind?) krollin
- Re: GCC Compiler Bug? (Or am I just losing my mind?) Igor Mozolevsky
- Re: GCC Compiler Bug? (Or am I just losing my mind?) krollin
- Re: GCC Compiler Bug? (Or am I just losing my mind?) John Leung
