[Bug c++/80635] std::optional and bogus -Wmaybe-uninitialized warning
jason at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Tue Dec 17 19:20:00 GMT 2019
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80635
--- Comment #31 from Jason Merrill <jason at gcc dot gnu.org> ---
(In reply to Pedro Alves from comment #30)
> I assume so, but do we really want to zero-initialize the buffer? T might
> be large, and I'd think that pessimization to quiet a warning isn't the
> right way to go?
The usual way to quiet a maybe-uninit warning is to add redundant
initialization; this doesn't seem that different, apart from it being in a
library that could potentially be used in performance-sensitive code.
More information about the Gcc-bugs
mailing list