[Bug sanitizer/116026] Copying or moving a std::variant that can be a vector causes a maybe-uninitialized warning with -fsanitize=address -Og -finline-functions-called-once

pinskia at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Sun Jul 21 21:13:38 GMT 2024


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

--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Note the documentation warns about this case
https://gcc.gnu.org/onlinedocs/gcc-14.1.0/gcc/Instrumentation-Options.html#index-fsanitize_003daddress

Note that sanitizers tend to increase the rate of false positive warnings, most
notably those around -Wmaybe-uninitialized. We recommend against combining
-Werror and [the use of] sanitizers.


More information about the Gcc-bugs mailing list