https://gcc.gnu.org/bugzilla/show_bug.cgi?id=127486
Drea Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Resolution|--- |INVALID
Status|UNCONFIRMED |RESOLVED
--- Comment #1 from Drea Pinski <pinskia at gcc dot gnu.org> ---
This is documented this way:
When zero-initializing a variable or field of hardened boolean type (presumably
held in static storage) the implied zero initializer gets converted to _Bool,
and then to the hardened boolean type, so that the initial value is the
hardened representation for false. Using that value is well defined.
What it means if you do:
```
static hbool zeroinit;
int main(void)
{
unsigned char rep;
rep = zeroinit;
```
It will be valid that way. It does not mean the value that is zero-initialized
will be 0x5a. It also means you can't do a memcpy from an hardbool type to see
the representation.