title: C Function alignment in GCC
body: <p>I am trying to byte-align a function to 16-byte boundary using the 'aligned(16)' attribute. I did the following:  <code>void  __attribute__((aligned(16)))  function() {  }</code> </p>
  
  <p>(Source: <a href="http://gcc.gnu.org/onlinedocs/gcc/Function-Attributes.html" rel="noreferrer">http://gcc.gnu.org/onlinedocs/gcc/Function-Attributes.html</a>)</p>
  
  <p>But when I compile (gcc foo.c ; no makefiles or linker scripts used), I get the following error:</p>
  
  <p>FOO.c:99: error: alignment may not be specified for 'function'</p>
  
  <p>I tried aligning to 4,8,32, etc as well but the error remains the same.
  I need this to align an Interrupt Service Routine for a powerpc-based processor. What is the correct way of doing so ?</p>