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

Alexis Tsogias <a.tsogias at cellumation dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |a.tsogias at cellumation dot 
com

--- Comment #2 from Alexis Tsogias <a.tsogias at cellumation dot com> ---
I stumbled across the same problem. But static and const are not necessary.
Additionally this only happens when optimizations are enabled (so -O1 and
onward).
Gcc version 12.1 and newer seem to be effected by this.

So essentially the following two liner causes this warning when compiled with
"-fsanitize=address -Wall -O1 ":

#include <regex>
int main() { std::regex rgx{"hello"}; }


Since we are compiling with -Werror we have to ignore the warning (locally
where regex is used) to be able to use asan...

Reply via email to