Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-65355

false positive in time_support_test under v4 gcc

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 6.0.0-rc0
    • Affects Version/s: None
    • Component/s: None
    • None
    • Fully Compatible
    • ALL
    • Hide
      source python3-venv/bin/activate
      rm -rf ./build/debug/install/bin
      rm -rf ./build/opt/install/bin
      ./buildscripts/scons.py --variables-files=etc/scons/mongodbtoolchain_v4_gcc.vars --cxx-std=20 --link-model=dynamic --ssl --ninja generate-ninja ICECC=icecc CCACHE=ccache --dbg=on --modules=""
      ninja -j500 install-all
      
      
      I get this error:
      
      [1900/3062 ( 62%) 51.481s] Compiling build/debug/mongo/util/time_support_test.o
      FAILED: build/debug/mongo/util/time_support_test.o 
      export PATH='/opt/mongodbtoolchain/v4/bin:/usr/local/bin:/opt/bin:/bin:/usr/bin';export CCACHE_NOCPP2='1';export CCACHE_PREFIX='/home/ubuntu/mongo/build/scons/icecream/debug/run-icecc.sh';/opt/mongodbtoolchain/v4/bin/ccache /opt/mongodbtoolchain/v4/bin/g++ @build/debug/mongo/util/time_support_test.o.rsp
      src/mongo/util/time_support_test.cpp: In member function ‘virtual void mongo::{anonymous}::UnitTest_SuiteNameTimeParsingTestNameInvalidDates::_doTest()’:
      src/mongo/util/time_support_test.cpp:416:29: error: loop variable ‘s’ of type ‘const string&’ {aka ‘const std::__cxx11::basic_string<char>&’} binds to a temporary constructed from type ‘const char* const’ [-Werror=range-loop-construct]
        416 |     for (const std::string& s : badDates) {
            |                             ^
      src/mongo/util/time_support_test.cpp:416:29: note: use non-reference type ‘const string’ {aka ‘const std::__cxx11::basic_string<char>’} to make the copy explicit or ‘const char* const&’ to prevent copying
      cc1plus: all warnings being treated as errors
      [1923/3062 ( 62%) 52.364s] Linking build/debug/mongo/util/net/libssl_manager.so
      ninja: build stopped: subcommand failed.
      
      Show
      source python3-venv/bin/activate rm -rf ./build/debug/install/bin rm -rf ./build/opt/install/bin ./buildscripts/scons.py --variables-files=etc/scons/mongodbtoolchain_v4_gcc.vars --cxx-std=20 --link-model=dynamic --ssl --ninja generate-ninja ICECC=icecc CCACHE=ccache --dbg=on --modules="" ninja -j500 install-all I get this error: [1900/3062 ( 62%) 51.481s] Compiling build/debug/mongo/util/time_support_test.o FAILED: build/debug/mongo/util/time_support_test.o export PATH='/opt/mongodbtoolchain/v4/bin:/usr/local/bin:/opt/bin:/bin:/usr/bin';export CCACHE_NOCPP2='1';export CCACHE_PREFIX='/home/ubuntu/mongo/build/scons/icecream/debug/run-icecc.sh';/opt/mongodbtoolchain/v4/bin/ccache /opt/mongodbtoolchain/v4/bin/g++ @build/debug/mongo/util/time_support_test.o.rsp src/mongo/util/time_support_test.cpp: In member function ‘virtual void mongo::{anonymous}::UnitTest_SuiteNameTimeParsingTestNameInvalidDates::_doTest()’: src/mongo/util/time_support_test.cpp:416:29: error: loop variable ‘s’ of type ‘const string&’ {aka ‘const std::__cxx11::basic_string<char>&’} binds to a temporary constructed from type ‘const char* const’ [-Werror=range-loop-construct] 416 | for (const std::string& s : badDates) { | ^ src/mongo/util/time_support_test.cpp:416:29: note: use non-reference type ‘const string’ {aka ‘const std::__cxx11::basic_string<char>’} to make the copy explicit or ‘const char* const&’ to prevent copying cc1plus: all warnings being treated as errors [1923/3062 ( 62%) 52.364s] Linking build/debug/mongo/util/net/libssl_manager.so ninja: build stopped: subcommand failed.
    • Service Arch 2022-04-18
    • 63

          Assignee:
          billy.donahue@mongodb.com Billy Donahue
          Reporter:
          billy.donahue@mongodb.com Billy Donahue
          Votes:
          0 Vote for this issue
          Watchers:
          4 Start watching this issue

            Created:
            Updated:
            Resolved: