<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/60832>60832</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
Include -Wpacked in -Wall
</td>
</tr>
<tr>
<th>Labels</th>
<td>
new issue
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
mmarczell-graphisoft
</td>
</tr>
</table>
<pre>
If someone compiles with `-Wall`, https://github.com/llvm/llvm-project/issues/51181 might still bite them. In our scenario we were using a struct like this to write our binary file format. The layout changed silently with the compiler upgrade and wrote invalid files.
```
class Guid {
uint64_t mLow, mHigh;
};
struct __attribute__ ((packed)) FormatHeader {
float x;
bool b;
Guid guid;
};
```
https://godbolt.org/z/jb1h3eqPK
It would be better if `-Wpacked` would be included in `-Wall`.
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJyck89upDgQxp_GXEppGdPQzYFDshGb1u5hDyvNseU_BTgxuMcuh-k8_Qi6k3RGcxoJFWBcxfcrfyVjtP2E2LDygZWPmUw0-NCMowz6DZ2764M8DTb6jjLlzbk5dBD9iH5C0H48WYcRZksDsIrffZPOsYoz8RcMRKfIinsmWiba3tKQ1Eb7kYnWudf3290p-GfUxERrY0wYmWjLPN_nMNp-IIhknQNlCYEGHDdwmMCnAFHjJIP1MCPMGBBStFMPEiKFpAmcfVkybATyMIclf0lTdpLhDJ11CJ0Po6QN_D8gOHn2iUAPcurRQLQOJ3LnCxgNH6gB0qkP0iDIycAcPCHY6VU6a9aiccP4I-P311jx67W-aidjhL-TNcB2D5c1AIBkJ6q2R4LxXz8vrRufbD-w4rqF7R4_n2_ilfR4lETBqkR4PAITeyb2J6lf0DBRM1FDu3I-oTQYbn7cOS8JfnyUXpQo7x2oL0ur3D5Z83s9Xwkv8ZeT90Z5RxsfeibaNybaZ5UPBX7_75_bpAPB7JMzoBAUEmEA2108daWp-OcOO2mXDBqw063vrt3PTFOYuqhlhk1e7apKlFWZZ0NTYrFTCrttt8WSG6NrbXRXl7WptdSoM9sILgou8h2vBS_zzdbwMhdbUdY5z0Wn2ZbjKK3bLOZdmLLVtk3F94XInFTo4jpKQkw4w_qRCbFMVmhWw6vUR7blzkaKn1XIksPmcMGCd-YFb2XLUnDNn0_Uqu5nAAAA__9SVDj9">