diff options
author | Emilio Cobos Álvarez <emilio@crisal.io> | 2020-11-28 01:33:32 +0100 |
---|---|---|
committer | Emilio Cobos Álvarez <emilio@crisal.io> | 2020-11-28 03:14:51 +0100 |
commit | 19142ac6b3d8ee4fc5686d6f30b77e660026e528 (patch) | |
tree | 7be336cb2bfd34e6a8c844b868efb4332aba9c4f /bindgen-integration/cpp/Test.h | |
parent | 6a5726eac514b49ec8a9f8360ed5d0d73da9feb7 (diff) |
struct_layout: Fix field offset computation for packed(n) structs.
This can cause unnecessary padding to be computed otherwise at the end
of the struct.
With repr(packed(n)), a field can have padding to adjacent fields as
long as its alignment is less than n. So reuse the code we have to align
to a field layout, aligning to the struct layout instead.
Fixes #1934
Diffstat (limited to 'bindgen-integration/cpp/Test.h')
0 files changed, 0 insertions, 0 deletions