title: Storage of local constants in C
body: <p>I have a question regarding storage of constants in C.</p>
  
  <p>If I have the following statement:</p>
  
  <pre><code>const int a = 5;
  </code></pre>
  
  <p>If the statement was in global scope, the constant would be stored in .rodata .
  I have been working with the TI compiler for MSP430 devices. If the statement was in local scope, the constant is stored on the stack .</p>
  
  <p>I am not sure what would happen if I declare it as a "static const" in local scope, but I would expect it to be stored in .rodata .</p>
  
  <p>Is this behavior correct?</p>