title: __attribute(aligned) test. What does it do?
body: <p>I am using a couple of online compilers to test a sample program (for reference, the one in ideone and the one in tutorialspoint) 
  The program is:</p>
  
  <pre><code>#include &lt;stdio.h&gt;
  #include &lt;stdint.h&gt; 
  
  uint8_t Array[5]__attribute((aligned(32)));
  uint8_t Array2[5]__attribute((aligned(8)));
  static uint8_t Array3[5]__attribute((aligned(8)));
  static uint8_t Array4[5]__attribute((section("bbs"),aligned(32)));
  
  
  int main()
  {
      printf("%p %p %p %p %p \n", &amp;Array[0], &amp;Array[1], &amp;Array[2], &amp;Array[3],&amp;Array[4]);
      printf("%p %p %p %p %p \n", &amp;Array2[0], &amp;Array2[1], &amp;Array2[2], &amp;Array2[3],&amp;Array2[4]);
      printf("%p %p %p %p %p \n", &amp;Array3[0], &amp;Array3[1], &amp;Array3[2], &amp;Array3[3],&amp;Array3[4]);
      printf("%p %p %p %p %p \n", &amp;Array4[0], &amp;Array4[1], &amp;Array4[2], &amp;Array4[3],&amp;Array4[4]);
  
      return 0;
  }
  </code></pre>
  
  <p>The results are for example</p>
  
  <pre><code>0x2aff9175b0a0 0x2aff9175b0a1 0x2aff9175b0a2 0x2aff9175b0a3 0x2aff9175b0a4 
  0x2aff9175b080 0x2aff9175b081 0x2aff9175b082 0x2aff9175b083 0x2aff9175b084 
  0x2aff9175b068 0x2aff9175b069 0x2aff9175b06a 0x2aff9175b06b 0x2aff9175b06c 
  0x2aff9175b040 0x2aff9175b041 0x2aff9175b042 0x2aff9175b043 0x2aff9175b044 
  </code></pre>
  
  <p>I can see that aligned does not seem to have an effect on where the array elements are stored. What does aligned actually do? (I am asking <em>after</em> reading the explanation in <a href="https://gcc.gnu.org/onlinedocs/gcc-3.2/gcc/Type-Attributes.html" rel="nofollow noreferrer">here</a> which I didn't quite catch.)</p>