================
@@ -2306,6 +2306,24 @@ are listed below.
additional function arity information (for supported targets). See
:doc:`ControlFlowIntegrity` for more details.
+.. option:: -fstrict-bool
+
+ ``bool`` values are stored to memory as 8-bit values on most targets. Under
+ ``-fstrict-bool``, it is undefined behavior for a ``bool`` value stored in
+ memory to have any other bit pattern than 0 or 1. This creates some
+ optimization opportunities for the compiler, but it enables memory
+ corruption if that assumption is violated, for instance if any other value
+ is ``memcpy``ed over a ``bool``. This is enabled by default.
----------------
erichkeane wrote:
"enabled by default" is something we need to make sure gets out of the RFC.
https://github.com/llvm/llvm-project/pull/160790
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits