[Bug c++/70834] Incorrect warning for placement new when conditionally used
manu at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Tue Jan 3 22:08:00 GMT 2017
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70834
Manuel López-Ibáñez <manu at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Keywords| |diagnostic
Status|UNCONFIRMED |NEW
Last reconfirmed| |2017-01-03
CC| |manu at gcc dot gnu.org
Ever confirmed|0 |1
--- Comment #3 from Manuel López-Ibáñez <manu at gcc dot gnu.org> ---
The warning comes from the FE, which knows nothing about control-flow. We have
many open PRs regarding this (see PR23577) but it is not something that will
change in the near future.
It may work if you use ?: since that is optimised very early (but perhaps not
before this warning, I don't know).
More information about the Gcc-bugs
mailing list