What I discovered after digging a bit deeper is that it doesn't actually look like temp is being assigned the wrong value.

Here's the code, as best as I can remember it:

Code:
#include <iostream>

using namespace std;

const float PI = 3.14159265359;

float restrictAngle( float const *angle )
{
    int circles;
    float temp;

    circles = (int)( *angle / ( 2 * PI ) );
    temp = *angle - ( circles * 2 * PI );

    if( temp > PI )
    {
        temp -= ( 2 * PI );
    }
    else if( temp < (-PI) )
    {
        temp += ( 2 * PI );
    }

    return temp;
}

int main()
{
    float radians;
    int temp = 1;
    radians = temp * ( 45.0 * PI / 180.0 );
    radians = restrictAngle( &radians );
}
Now, with this code, the value we assign to radians shouldn't change between the first and second assignment. However, what I am seeing with this code compiled via ARM, is that we get the return value for restrictAngle, and before we actually store that value into radians, we convert it from an int to a float. This conversion causes radians to get assigned a very large number (I cannot remember the number off the top of my head). I know this happening because when I run the actual code without the debugger, the behavior of the embedded device is not what it should be. I hope this helps to illuminate the issue I am seeing. It's not something that I think is easy to describe. Thanks again.