This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/35766] Should cast pointers and references more efficiently and safely
- From: "pinskia at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 29 Dec 2008 03:44:09 -0000
- Subject: [Bug c++/35766] Should cast pointers and references more efficiently and safely
- References: <bug-35766-15989@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #1 from pinskia at gcc dot gnu dot org 2008-12-29 03:44 -------
I get a branchless form with -march=i686 -O2:
testl %edx, %edx
leal 4(%edx), %ecx
cmovne %ecx, %eax
Also in your case if d is NULL, then b has to be NULL. Nothing to do with
anything else
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35766