[Bug middle-end/122068] Add -fstrict-bool, -fno-strict-bool={truncate,nonzero} option
pinskia at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Wed Oct 1 08:45:19 GMT 2025
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=122068
--- Comment #4 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
(In reply to Richard Biener from comment #3)
> Is that the same as hardbool?
No. Hardbool traps when the value is neither true or false value.
>From the patch
(https://patchwork.sourceware.org/project/gcc/patch/orlet4lmn8.fsf@lxoliva.fsfla.org/#147717)
that introduces hardbool:
> trapping if the value is neither true nor false,
And also unlike hardbool, this applies to all boolean types.
More information about the Gcc-bugs
mailing list