Quantcast
Channel: warning: taking address of packed member of 'struct details' may result in an unaligned pointer value [-Waddress-of-packed-member] - Stack Overflow
Browsing all 2 articles
Browse latest View live

Answer by oromoiluig for warning: taking address of packed member of 'struct...

In the comments to your post you have the explanation of the why it warns and why it can be a bad idea to take a pointer of a non-aligned member. The issue is not so much about assigning an unaligned...

View Article



warning: taking address of packed member of 'struct details' may result in an...

struct details_state { struct details_status D1; struct details_status D2; }; struct details { struct details_state details_states[2]; } __attribute__((packed)); struct details *p; void...

View Article
Browsing all 2 articles
Browse latest View live




Latest Images

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