title: clang compaining about __attribute__((packed)) even though the struct needs to be packed
body: <p>I have a struct, which needs to be packed (without packing the size is 20 bytes, but I need 16 to be able to read/write it). When I added the packed attribute I got <code>error: packed attribute is unnecessary for</code> warnings for all the members of the struct. When silencing the error with the pragmas, the code compiles fine and the size of the struct is 16, but if I remove the pragmas it fails (since I'm using <code>-Werror</code>). Is clang just issuing this warning incorrectly or am I doing something wrong?</p>
  
  <pre><code>#include &lt;cstdint&gt;
  
  typedef struct __attribute__((packed))
  {
      uint16_t wFormatTag;
      uint16_t nChannels;
      uint32_t nSamplesPerSec;
      uint32_t nAvgBytesPerSec;
      uint16_t nBlockAlign;
  }
  WAVEFORMAT;
  
  int main()
  {
      WAVEFORMAT w;
      (void)w;
  }
  </code></pre>
  
  <p>I am using the Xcode9 toolchain:</p>
  
  <pre><code>clang -v
  Apple LLVM version 9.0.0 (clang-900.0.39.2)
  Target: x86_64-apple-darwin16.7.0
  </code></pre>
  
  <p>Which generates the warning when compiled with <code>-Weverything</code>:</p>
  
  <pre><code>clang++ -Weverything pack.cpp
  
  pack.cpp:8:10: warning: packed attribute is unnecessary for 'wFormatTag' [-Wpacked]
      WORD wFormatTag;
          ^
  ...
  </code></pre>