title: Switching off optimization for a specific function in gcc 4.2.2
body: <p>Is it possible to switch off optimization of a specific function?
  A friend of mine has the problem that the gcc optimization makes some (unknown to me) µ-controller-code not work.
  We know which functions it is, but we have no clue of the code itself so the easiest and safest way would probably be to just switch it off for the whole function.</p>
  
  <p>Sadly <a href="http://gcc.gnu.org/onlinedocs/gcc/Function-Attributes.html" rel="noreferrer">http://gcc.gnu.org/onlinedocs/gcc/Function-Attributes.html</a> shows that there is a an optimize function attribute / pragma, but it requires gcc 4.4, which we do not have.</p>
  
  <p>thanks in advance</p>