[Bug c++/54130] Recognize builtins with bool return type
glisse at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Wed Aug 1 09:52:00 GMT 2012
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54130
--- Comment #13 from Marc Glisse <glisse at gcc dot gnu.org> 2012-08-01 09:52:19 UTC ---
(In reply to comment #10)
> (In reply to comment #9)
> > I realize that several (not all) of the things discussed here assume that
> > functions returning bool and int are binary compatible, which is likely true on
> > most platforms but there might be exceptions.
>
> It's not true on x86_64 - return values are not extended to word_mode thus
> you may have garbage in the upper parts of %eax for bool.
Wait, actually, it only requires compatibility in one direction, that a
function returning int (isnan for instance) can be used as a function returning
bool, which seems ok in that case (there could still be other
counter-examples).
More information about the Gcc-bugs
mailing list