r/C_Programming • u/anduygulama • Jun 09 '26
packed attribute for structs
Why don't C compilers automatically optimize/pack structures instead of requiring explicit attributes?
2
Upvotes
r/C_Programming • u/anduygulama • Jun 09 '26
Why don't C compilers automatically optimize/pack structures instead of requiring explicit attributes?
View all comments
6
u/tstanisl Jun 09 '26
Because the compiler must: