At 11:27 AM 6/2/2004, you wrote:
Then the code which puzzles me :

double ReturnDouble()
{ return 3.1416; }

static void Go()
{
double d,e;
int i;
d=ReturnDouble();
i=(int)d;
e=(double)i;
...
}

after this, the values of the variables are : d=3.1416, i=3, e=0 !!!
I don't understand why e cannot take the value of i.

Any idea ?

Is 'e' used in the code after the assignment? Could this be a situation where the optimized in GCC sees that e is unused, so it eliminates the assignment? At what optimization level are you building your code, and what version of prc-tools are you using?



-- Ben Combee, DTS technical lead, PalmSource, Inc. Read "Combee on Palm OS" at http://palmos.combee.net/



--
For information on using the Palm Developer Forums, or to unsubscribe, please see 
http://www.palmos.com/dev/support/forums/

Reply via email to