https://gcc.gnu.org/bugzilla/show_bug.cgi?id=52231

--- Comment #5 from Nathan Froyd <froydnj at gcc dot gnu.org> ---
FWIW, clang (>= 3.5) understands how to optimize the original testcase in
comment 0; it even issues a -Wtautological-undefined-compare warning.

This also showed up in the context of trying to hint to the compiler that
placement new didn't need null checks:

#include <new>

void init(int& p) { new (&p) float(3.14f); }

which clang understands how to optimize and GCC does not.

Reply via email to