[riot-notifications] [RIOT-OS/RIOT] gnrc/ipv6_auto_subnets: relax topology requirements (#16750)

benpicco notifications at github.com
Tue Sep 28 16:32:11 CEST 2021


@benpicco commented on this pull request.



> +    uint8_t version : 4;    /**< version number, should be 0 */
+    uint8_t flags   : 4;    /**< flags, unused, should be 0 */

> **If enough space remains**, a bit-field that immediately follows another bit-field in a structure shall be **packed into adjacent bits of the same unit**. If **insufficient space remains**, whether a bit-field that does not fit is put into the next unit or overlaps adjacent units is implementation-defined.

This is only an issue if you write

```C
struct foo {
    uint8_t version : 4; 
    uint8_t flags   : 6;
} _auto_subnets_request_t;
```

Now `flags` could either use some bits of the first byte or entirely occupy the second byte.

If the bits add up to a whole byte, there should be no ambiguity. 

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/RIOT-OS/RIOT/pull/16750#discussion_r717642021
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.riot-os.org/pipermail/notifications/attachments/20210928/9c0982aa/attachment.htm>


More information about the notifications mailing list