From 9f215318b8967940a8fc2385de9bc0e3faf02e7e Mon Sep 17 00:00:00 2001 From: Jonathan Marler Date: Wed, 16 Nov 2022 23:41:54 -0700 Subject: [PATCH] packed struct fix example and clarify least to most significant ordering The packed struct example was mistakenly applying endianness where it shouldn't have been. This wasn't being caught because we don't currently test the examples on Big-endian systems. I updated the test to remove the endianness where it didn't apply, and added a new part of the test to demonstrate when it would apply. --- doc/langref.html.in | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/doc/langref.html.in b/doc/langref.html.in index 7ac1678e9321bff086f0df5914ffcee680bd0d1b..1a7ef8f5638a92dc5616c9b394cc05f1dbc102ec 100644 --- a/doc/langref.html.in +++ b/doc/langref.html.in @@ -3277,7 +3277,7 @@ test "default struct initialization fields" { Unlike normal structs, {#syntax#}packed{#endsyntax#} structs have guaranteed in-memory layout: