New/improved warning option for padding bytes
Jonas Rahlf
jonas.rahlf@gmail.com
Fri Aug 19 10:12:35 GMT 2022
As a firmware developer I would appreciate a warning option about padding
bytes, but only for such cases where you can reduce the number of padding
bytes by rearranging the fields.
The current -Wpadded warns about all padding bytes, which is annoying.
The concept sounds simple: you rearrange all fields from large to small and
check if the size changed.
The goal is to more easily optimize RAM/flash in space constrained systems.
Jonas
More information about the Gcc
mailing list