[Bug middle-end/91174] Suboptimal code for arithmetic with bool and char

fw at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Mon Jul 15 14:43:00 GMT 2019


Florian Weimer <fw at gcc dot gnu.org> changed:

           What    |Removed                     |Added
                 CC|                            |fw at gcc dot gnu.org

--- Comment #1 from Florian Weimer <fw at gcc dot gnu.org> ---
For which ABI do you propose the change?  It's not correct for GNU/Linux:

“When a value of type _Bool is returned or passed in a register or on the
bit 0 contains the truth value and bits 1 to 7 shall be zero.” And the footnote
says: “Other bits are left unspecified, hence the consumer side of those values
can rely on it being 0 or 1 when truncated to 8 bit.”

More information about the Gcc-bugs mailing list