Example of `$size_in_bits` from documentation fails to compile
Open
bug
documentation
- Dominant language
- Python
- Stars
- 92
- Forks
- 30
- PR merge metrics
- No merged PRs in 30d
Description
The example provided in https://github.com/google/emboss/blob/master/doc/language-reference.md#size_in_bits-size-in-bits (using `bits FixedSize` and `struct Envelope` gives the following error when built with emboss:
```
error: Fixed-size type 'FixedSize' cannot be placed in field of size 64 bits; requires 4 bits.
0 [+8] FixedSize padded_payload
^^^^^^^^^
```
This seems to imply that `FixedSize` needs to be padded out to a whole byte increment. We should either:
* relax the restrictions around padding (auto-pad by default?), or
* fix the example to include the necessary padding
Contributor guide
Assessment
This issue has not been assessed yet.