'int' bitfields in particular have implementation defined behaviour under gcc and can change signed-ness with -funsigned-bitfields.
There is no need for low_bit_was_clear to be a bitfield in the first place; it is only used as a boolean. Doing so even improves the code generation in sh_emulate_map_dest() to avoid emitting a merge with structure padding. Spotted by Eclair MISRA scanner. Signed-off-by: Andrew Cooper <andrew.coop...@citrix.com> --- CC: Jan Beulich <jbeul...@suse.com> CC: Roger Pau Monné <roger....@citrix.com> CC: Wei Liu <w...@xen.org> CC: Stefano Stabellini <sstabell...@kernel.org> CC: Julien Grall <jul...@xen.org> CC: Volodymyr Babchuk <volodymyr_babc...@epam.com> CC: Bertrand Marquis <bertrand.marq...@arm.com> --- xen/arch/x86/mm/shadow/private.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xen/arch/x86/mm/shadow/private.h b/xen/arch/x86/mm/shadow/private.h index 3dc024e30f20..772521b55dd3 100644 --- a/xen/arch/x86/mm/shadow/private.h +++ b/xen/arch/x86/mm/shadow/private.h @@ -827,7 +827,7 @@ struct sh_emulate_ctxt { #if (SHADOW_OPTIMIZATIONS & SHOPT_SKIP_VERIFY) /* Special case for avoiding having to verify writes: remember * whether the old value had its low bit (_PAGE_PRESENT) clear. */ - int low_bit_was_clear:1; + bool low_bit_was_clear; #endif }; -- 2.11.0