mirror of
https://github.com/google/flatbuffers.git
synced 2025-04-08 09:12:14 +08:00
* Rare fix: kick fix test * Rare fix: real fix * Rare fix: separate test * Rare fix: remove comments * Rare fix: updates * Rare fix: less * Rare fix: size_t switch to uoffset_t * Rare fix: swap exp/val * Rare fix: add annotated before/after * Rare fix: remove unnecessary changes --------- Co-authored-by: Derek Bailey <derekbailey@google.com>
36 lines
598 B
Plaintext
36 lines
598 B
Plaintext
// sizeof(BadAlignmentSmall) == 12
|
|
// alignof(BadAlignmentSmall) == 4
|
|
struct BadAlignmentSmall {
|
|
var_0: uint;
|
|
var_1: uint;
|
|
var_2: uint;
|
|
}
|
|
|
|
// sizeof(BadAlignmentLarge) == 8
|
|
// alignof(BadAlignmentLarge) == 8
|
|
struct BadAlignmentLarge {
|
|
var_0: ulong;
|
|
}
|
|
|
|
table OuterLarge {
|
|
large: BadAlignmentLarge;
|
|
}
|
|
|
|
table BadAlignmentRoot {
|
|
large: OuterLarge;
|
|
small: [BadAlignmentSmall];
|
|
}
|
|
|
|
// sizeof(JustSmallStruct) == 2
|
|
// alignof(JustSmallStruct) == 1
|
|
struct JustSmallStruct {
|
|
var_0: uint8;
|
|
var_1: uint8;
|
|
}
|
|
|
|
table SmallStructs {
|
|
small_structs: [JustSmallStruct];
|
|
}
|
|
|
|
root_type SmallStructs;
|