title: Global variable is smashed
body: <p>I have the next code:</p>
  
  <pre><code>#include &lt;math.h&gt;
  
  int x;
  float Temp = 0;
  
  void main(){
  
  x = 2;
  
  for(;;){
     Temp=log(20);
  }
  }
  </code></pre>
  
  <p>I shortened my code to the important line. The problem I have is once x is declared as 2 and then I do log() function, this calculation alter to x variable and change it to a huge valour.</p>
  
  <p>Codewarrior (the IDE I'm using to), says that Temp variable is in the location 0x0102 and x variable is in 0x0108.</p>
  
  <p>I need x for a function in "MCUinit.h" so it's important that x variable isn't greater than 5, and codewarrior give like 5000 or even greater after doing log(whatever)</p>
  
  <p>How could I do so that log() don't alter others variables?</p>
  
  <p>thanks</p>
  
  <p>Before doing log() function.
  <a href="https://ibb.co/6ZHh6D0" rel="nofollow noreferrer">https://ibb.co/6ZHh6D0</a></p>
  
  <p>After doing log() function.
  <a href="https://ibb.co/Np99Sz4" rel="nofollow noreferrer">https://ibb.co/Np99Sz4</a></p>