Skip to content

[BUG] + matser: build fails with gcc 12.0.1 #1350

@kloczek

Description

@kloczek

Describe the bug
Build fails.

System
Which OS, compiler, and compiler version are you using:

  • OS: Linux x86/64
  • Compiler and version: gcc 12.0.1
[ 25%] Linking CXX shared library libbenchmark.so
cd /home/tkloczko/rpmbuild/BUILD/benchmark-1.6.1/x86_64-redhat-linux-gnu/src && /usr/bin/cmake -E cmake_link_script CMakeFiles/benchmark.dir/link.txt --verbose=1
/usr/bin/g++ -fPIC -O2 -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -fdata-sections -ffunction-sections -flto=auto -flto-partition=none  -std=c++11  -Wall  -Wextra  -Wshadow  -pedantic  -pedantic-errors  -fstrict-aliasing  -Wno-deprecated-declarations  -Wstrict-aliasing -DNDEBUG  -Werror  -Wno-deprecated -Wl,-z,relro -Wl,--as-needed -Wl,--gc-sections -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -flto=auto -flto-partition=none -fuse-linker-plugin -Wl,--build-id=sha1 -shared -Wl,-soname,libbenchmark.so.2 -o libbenchmark.so.1.6.1 CMakeFiles/benchmark.dir/benchmark.cc.o CMakeFiles/benchmark.dir/benchmark_api_internal.cc.o CMakeFiles/benchmark.dir/benchmark_name.cc.o CMakeFiles/benchmark.dir/benchmark_register.cc.o CMakeFiles/benchmark.dir/benchmark_runner.cc.o CMakeFiles/benchmark.dir/check.cc.o CMakeFiles/benchmark.dir/colorprint.cc.o CMakeFiles/benchmark.dir/commandlineflags.cc.o CMakeFiles/benchmark.dir/complexity.cc.o CMakeFiles/benchmark.dir/console_reporter.cc.o CMakeFiles/benchmark.dir/counter.cc.o CMakeFiles/benchmark.dir/csv_reporter.cc.o CMakeFiles/benchmark.dir/json_reporter.cc.o CMakeFiles/benchmark.dir/perf_counters.cc.o CMakeFiles/benchmark.dir/reporter.cc.o CMakeFiles/benchmark.dir/sleep.cc.o CMakeFiles/benchmark.dir/statistics.cc.o CMakeFiles/benchmark.dir/string_util.cc.o CMakeFiles/benchmark.dir/sysinfo.cc.o CMakeFiles/benchmark.dir/timers.cc.o  -lrt
In member function 'operator()',
    inlined from '_M_expression_term' at /usr/include/c++/12/bits/regex_compiler.tcc:491:19,
    inlined from '_M_insert_bracket_matcher' at /usr/include/c++/12/bits/regex_compiler.tcc:419:32,
    inlined from '_M_bracket_expression' at /usr/include/c++/12/bits/regex_compiler.tcc:350:7,
    inlined from '_M_atom' at /usr/include/c++/12/bits/regex_compiler.tcc:336:38,
    inlined from '_M_term' at /usr/include/c++/12/bits/regex_compiler.tcc:133:24,
    inlined from '_M_alternative' at /usr/include/c++/12/bits/regex_compiler.tcc:115:24:
/usr/include/c++/12/bits/regex_compiler.tcc:443:32: error: '__last_char._M_char' may be used uninitialized [-Werror=maybe-uninitialized]
  443 |           __matcher._M_add_char(__last_char.get());
      |                                ^
/usr/include/c++/12/bits/regex_compiler.tcc: In member function '_M_alternative':
/usr/include/c++/12/bits/regex_compiler.tcc:413:21: note: '__last_char._M_char' was declared here
  413 |       _BracketState __last_char;
      |                     ^
In member function '_M_add_char',
    inlined from 'operator()' at /usr/include/c++/12/bits/regex_compiler.tcc:443:25,
    inlined from '_M_expression_term' at /usr/include/c++/12/bits/regex_compiler.tcc:491:19,
    inlined from '_M_insert_bracket_matcher' at /usr/include/c++/12/bits/regex_compiler.tcc:419:32,
    inlined from '_M_bracket_expression' at /usr/include/c++/12/bits/regex_compiler.tcc:350:7,
    inlined from '_M_atom' at /usr/include/c++/12/bits/regex_compiler.tcc:336:38,
    inlined from '_M_term' at /usr/include/c++/12/bits/regex_compiler.tcc:133:24,
    inlined from '_M_alternative' at /usr/include/c++/12/bits/regex_compiler.tcc:115:24:
/usr/include/c++/12/bits/regex_compiler.h:450:57: error: '__last_char._M_char' may be used uninitialized [-Werror=maybe-uninitialized]
  450 |         _M_char_set.push_back(_M_translator._M_translate(__c));
      |                                                         ^
/usr/include/c++/12/bits/regex_compiler.tcc: In member function '_M_alternative':
/usr/include/c++/12/bits/regex_compiler.tcc:413:21: note: '__last_char._M_char' was declared here
  413 |       _BracketState __last_char;
      |                     ^
lto1: all warnings being treated as errors

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions