title: Uninitialized register variable warning
body: <p>I was working with a old codebase where I encountered few line of code which was causing lot of repeated warnings during compilation. </p>
  
  <pre><code>#define EXAMPLE(_ptr) \
  {                               \
      register uintptr_t      *__sp __asm__("sp");        \
      (_ptr[0]) = (uintptr_t) __sp;                       \
      asm volatile("sw $a0,%0" : "=m" (_ptr[1])); \
      //SOME OTHER CODE HERE
  }
  </code></pre>
  
  <p>the warning was:</p>
  
  <pre><code>warning: ‘__sp’ may be used uninitialized in this function   
  </code></pre>
  
  <p>Can anyone help me in understanding what is happening in this code block and how to remove this warning.</p>