Quantcast
Channel: User Jeremy - Stack Overflow
Viewing all articles
Browse latest Browse all 46

Comment by Jeremy on Overeager struct packing warnings with `__attribute__((packed))`?

$
0
0
This question is quite old, but I had a similar problem with GCC 10.3. Despite the warning indicating [-Wattributes], I found that it was controlled by the -Wpacked option: "Warn if a structure is given the packed attribute, but the packed attribute has no effect on the layout or size of the structure. Such structures may be mis-aligned for little benefit." It seems that it warns of potential inefficiency if the packed struct is used in specific ways.

Viewing all articles
Browse latest Browse all 46

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>