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

            Bug ID: 107824
           Summary: maybe-uninitialized variable in std::function ctor
                    with -Wall -fsanitize=address when constructing a
                    regex
           Product: gcc
           Version: 12.2.0
               URL: https://godbolt.org/z/Phs5rM4xn
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: bill.trost at harmonicinc dot com
  Target Milestone: ---
            Target: x86-64

Created attachment 53947
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=53947&action=edit
error messages when compiling the program

The code below generates several warning messages when compiled with -Wall and
-fsanitize=address. Without the sanitizer, the code compiles fine.


#include <regex>

void f()
{
    std::regex r("");
}
// Options used: -O3 -Wall -Werror -fsanitize=address -std=gnu++2a
// Compiler used: x86-64 gcc 12.2


Warning messages are attached.
  • [Bug c++/107824] New: maybe... bill.trost at harmonicinc dot com via Gcc-bugs

Reply via email to