Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build fails with clang 'maybe_unused' attribute is a C++17 extension #1178

Closed
paparodeo opened this issue Dec 22, 2024 · 1 comment
Closed

Comments

@paparodeo
Copy link

paparodeo commented Dec 22, 2024

tried clang-16 & clang-19, gsl 4.1.0 on macOS 15.2 and nixpkgs

build log
Running phase: unpackPhase
@nix { "action": "setPhase", "phase": "unpackPhase" }
unpacking source archive /nix/store/bpmglwg76xpfqmbk6h1yd3j2viwpd48j-source
source root is source
Running phase: patchPhase
@nix { "action": "setPhase", "phase": "patchPhase" }
Running phase: updateAutotoolsGnuConfigScriptsPhase
@nix { "action": "setPhase", "phase": "updateAutotoolsGnuConfigScriptsPhase" }
Running phase: configurePhase
@nix { "action": "setPhase", "phase": "configurePhase" }
fixing cmake files...
cmake flags: -DCMAKE_FIND_USE_SYSTEM_PACKAGE_REGISTRY=OFF -DCMAKE_FIND_USE_PACKAGE_REGISTRY=OFF -DCMAKE_EXPORT_NO_PACKAGE_REGISTRY=ON -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_LOCALEDIR=/nix/store/avs4cjqi8rckpsqwnq5aqdq2hd2k8qm8-microsoft-gsl-4.1.0/share/locale -DCMAKE_INSTALL_LIBEXECDIR=/nix/store/avs4cjqi8rckpsqwnq5aqdq2hd2k8qm8-microsoft-gsl-4.1.0/libexec -DCMAKE_INSTALL_LIBDIR=/nix/store/avs4cjqi8rckpsqwnq5aqdq2hd2k8qm8-microsoft-gsl-4.1.0/lib -DCMAKE_INSTALL_DOCDIR=/nix/store/avs4cjqi8rckpsqwnq5aqdq2hd2k8qm8-microsoft-gsl-4.1.0/share/doc/GSL -DCMAKE_INSTALL_INFODIR=/nix/store/avs4cjqi8rckpsqwnq5aqdq2hd2k8qm8-microsoft-gsl-4.1.0/share/info -DCMAKE_INSTALL_MANDIR=/nix/store/avs4cjqi8rckpsqwnq5aqdq2hd2k8qm8-microsoft-gsl-4.1.0/share/man -DCMAKE_INSTALL_OLDINCLUDEDIR=/nix/store/avs4cjqi8rckpsqwnq5aqdq2hd2k8qm8-microsoft-gsl-4.1.0/include -DCMAKE_INSTALL_INCLUDEDIR=/nix/store/avs4cjqi8rckpsqwnq5aqdq2hd2k8qm8-microsoft-gsl-4.1.0/include -DCMAKE_INSTALL_SBINDIR=/nix/store/avs4cjqi8rckpsqwnq5aqdq2hd2k8qm8-microsoft-gsl-4.1.0/sbin -DCMAKE_INSTALL_BINDIR=/nix/store/avs4cjqi8rckpsqwnq5aqdq2hd2k8qm8-microsoft-gsl-4.1.0/bin -DCMAKE_INSTALL_NAME_DIR=/nix/store/avs4cjqi8rckpsqwnq5aqdq2hd2k8qm8-microsoft-gsl-4.1.0/lib -DCMAKE_POLICY_DEFAULT_CMP0025=NEW -DCMAKE_FIND_FRAMEWORK=LAST -DCMAKE_STRIP=/nix/store/wkadfwbhn9b4kdih88j7izzy20qw79bk-clang-wrapper-19.1.5/bin/strip -DCMAKE_RANLIB=/nix/store/wkadfwbhn9b4kdih88j7izzy20qw79bk-clang-wrapper-19.1.5/bin/ranlib -DCMAKE_AR=/nix/store/wkadfwbhn9b4kdih88j7izzy20qw79bk-clang-wrapper-19.1.5/bin/ar -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ -DCMAKE_INSTALL_PREFIX=/nix/store/avs4cjqi8rckpsqwnq5aqdq2hd2k8qm8-microsoft-gsl-4.1.0
-- The CXX compiler identification is Clang 19.1.5
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /nix/store/wkadfwbhn9b4kdih88j7izzy20qw79bk-clang-wrapper-19.1.5/bin/clang++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Found PkgConfig: /nix/store/8q86l30fjpgf800jwahdn4kylm99ibg5-pkg-config-wrapper-0.29.2/bin/pkg-config (found version "0.29.2")
-- Checking for one of the modules 'gtest_main'
-- Performing Test WARN_UNSAFE_BUFFER
-- Performing Test WARN_UNSAFE_BUFFER - Success
-- Configuring done (1.5s)
-- Generating done (0.0s)
CMake Warning:
  Manually-specified variables were not used by the project:

    CMAKE_C_COMPILER
    CMAKE_EXPORT_NO_PACKAGE_REGISTRY
    CMAKE_FIND_USE_PACKAGE_REGISTRY
    CMAKE_FIND_USE_SYSTEM_PACKAGE_REGISTRY
    CMAKE_POLICY_DEFAULT_CMP0025


-- Build files have been written to: /tmp/nix-build-microsoft-gsl-4.1.0.drv-0/source/build
cmake: enabled parallel building
cmake: enabled parallel installing
Running phase: buildPhase
@nix { "action": "setPhase", "phase": "buildPhase" }
build flags: -j8 SHELL=/nix/store/5wjj1f3pa1ndi3kvskm1fcs9kdy2xajf-bash-5.2p37/bin/bash
[  7%] Building CXX object tests/CMakeFiles/gsl_noexcept_tests.dir/no_exception_ensure_tests.cpp.o
[ 21%] Building CXX object tests/CMakeFiles/gsl_tests.dir/at_tests.cpp.o
[ 21%] Building CXX object tests/CMakeFiles/gsl_tests.dir/algorithm_tests.cpp.o
[ 28%] Building CXX object tests/CMakeFiles/gsl_tests.dir/span_compatibility_tests.cpp.o
[ 35%] Building CXX object tests/CMakeFiles/gsl_tests.dir/owner_tests.cpp.o
[ 42%] Building CXX object tests/CMakeFiles/gsl_tests.dir/notnull_tests.cpp.o
[ 50%] Building CXX object tests/CMakeFiles/gsl_tests.dir/byte_tests.cpp.o
[ 57%] Building CXX object tests/CMakeFiles/gsl_tests.dir/assertion_tests.cpp.o
[ 64%] Linking CXX executable gsl_noexcept_tests
/tmp/nix-build-microsoft-gsl-4.1.0.drv-0/source/tests/at_tests.cpp:32:1: error: use of the 'maybe_unused' attribute is a C++17 extension [-Werror,-Wc++17-attribute-extensions]
   32 | TEST(at_tests, static_array)
      | ^
/nix/store/qis4x8vjbq81bbdlgpnss4c5fbkzzyb4-gtest-1.15.2-dev/include/gtest/gtest.h:2192:42: note: expanded from macro 'TEST'
 2192 | #define TEST(test_suite_name, test_name) GTEST_TEST(test_suite_name, test_name)
      |                                          ^
/nix/store/qis4x8vjbq81bbdlgpnss4c5fbkzzyb4-gtest-1.15.2-dev/include/gtest/gtest.h:2186:3: note: expanded from macro 'GTEST_TEST'
 2186 |   GTEST_TEST_(test_suite_name, test_name, ::testing::Test, \
      |   ^
/nix/store/qis4x8vjbq81bbdlgpnss4c5fbkzzyb4-gtest-1.15.2-dev/include/gtest/internal/gtest-internal.h:1504:5: note: expanded from macro 'GTEST_TEST_'
 1504 |     GTEST_INTERNAL_ATTRIBUTE_MAYBE_UNUSED static ::testing::TestInfo* const    \
      |     ^
/nix/store/qis4x8vjbq81bbdlgpnss4c5fbkzzyb4-gtest-1.15.2-dev/include/gtest/internal/gtest-port.h:784:49: note: expanded from macro 'GTEST_INTERNAL_ATTRIBUTE_MAYBE_UNUSED'
  784 | #define GTEST_INTERNAL_ATTRIBUTE_MAYBE_UNUSED [[maybe_unused]]
      |                                                 ^
/tmp/nix-build-microsoft-gsl-4.1.0.drv-0/source/tests/assertion_tests.cpp:40:1: error: use of the 'maybe_unused' attribute is a C++17 extension [-Werror,-Wc++17-attribute-extensions]
   40 | TEST(assertion_tests, expects)
      | ^
/nix/store/qis4x8vjbq81bbdlgpnss4c5fbkzzyb4-gtest-1.15.2-dev/include/gtest/gtest.h:2192:42: note: expanded from macro 'TEST'
 2192 | #define TEST(test_suite_name, test_name) GTEST_TEST(test_suite_name, test_name)
      |                                          ^
/nix/store/qis4x8vjbq81bbdlgpnss4c5fbkzzyb4-gtest-1.15.2-dev/include/gtest/gtest.h:2186:3: note: expanded from macro 'GTEST_TEST'
 2186 |   GTEST_TEST_(test_suite_name, test_name, ::testing::Test, \
      |   ^
/nix/store/qis4x8vjbq81bbdlgpnss4c5fbkzzyb4-gtest-1.15.2-dev/include/gtest/internal/gtest-internal.h:1504:5: note: expanded from macro 'GTEST_TEST_'
 1504 |     GTEST_INTERNAL_ATTRIBUTE_MAYBE_UNUSED static ::testing::TestInfo* const    \
      |     ^
/nix/store/qis4x8vjbq81bbdlgpnss4c5fbkzzyb4-gtest-1.15.2-dev/include/gtest/internal/gtest-port.h:784:49: note: expanded from macro 'GTEST_INTERNAL_ATTRIBUTE_MAYBE_UNUSED'
  784 | #define GTEST_INTERNAL_ATTRIBUTE_MAYBE_UNUSED [[maybe_unused]]
      |                                                 ^
/tmp/nix-build-microsoft-gsl-4.1.0.drv-0/source/tests/owner_tests.cpp:26:1: error: use of the 'maybe_unused' attribute is a C++17 extension [-Werror,-Wc++17-attribute-extensions]
   26 | TEST(owner_tests, basic_test)
      | ^
/nix/store/qis4x8vjbq81bbdlgpnss4c5fbkzzyb4-gtest-1.15.2-dev/include/gtest/gtest.h:2192:42: note: expanded from macro 'TEST'
 2192 | #define TEST(test_suite_name, test_name) GTEST_TEST(test_suite_name, test_name)
      |                                          ^
/nix/store/qis4x8vjbq81bbdlgpnss4c5fbkzzyb4-gtest-1.15.2-dev/include/gtest/gtest.h:2186:3: note: expanded from macro 'GTEST_TEST'
 2186 |   GTEST_TEST_(test_suite_name, test_name, ::testi/tmp/nix-build-microsoft-gsl-4.1.0.drv-0/source/tests/assertion_tests.cpp:51:1: error: use of the 'maybe_unused' attribute is a C++17 extension [-Werror,-Wc++17-attribute-extensions]
   51 | TEST(assertion_tests, ensures)
      | ^
/nix/store/qis4x8vjbq81bbdlgpnss4c5fbkzzyb4-gtest-1.15.2-dev/include/gtest/gtest.h:2192:42: note: expanded from macro 'TEST'
 2192 | #define TEST(test_suite_name, test_name) GTEST_TEST(test_suite_name, test_name)
      |                                          ^
/nix/store/qis4x8vjbq81bbdlgpnss4c5fbkzzyb4-gtest-1.15.2-dev/includeng::Test, \
      |   ^
/nix/store/qis4x8vjbq81bbdlgpnss4c5fbkzzyb4-gtest-1.15.2-dev/include/gtest/internal/gtest-internal.h:1504:5: note: expanded from macro 'GTEST_TEST_'
 1504 |     GTEST_INTERNAL_ATTRIBUTE_MAYBE_UNUSED static ::testing::TestInfo* const    \
      |     ^
/nix/store/qis4x8vjbq81bbdlgpnss4c5fbkzzyb4-gtest-1.15.2-dev/include/gtest/internal/gtest-port.h:784:49: note: expanded from macro 'GTEST_INTERNAL_ATTRIBUTE_MAYBE_UNUSED'
/gtest/gtest.h:  2186784: | 3#:d efinote: neexpanded from macro 'GTEST_TEST'
 2186 |   GTEST_TEST_(test_suite_name, test_name, ::testing::Test, \
      |   ^
 /nix/store/qis4x8vjbq81bbdlgpnss4c5fbkzzyb4-gtest-1.15.2-dev/include/gtest/internal/gtest-internal.h:G1504T:E5S:T _INnote: TEexpanded from macro 'GTEST_TEST_'RN
AL_ATTRIBUTE_MAYBE_UNUSED [[maybe_ u1504n | u s e d ]G]TE
S      T| _I                                                ^N
TERNAL_ATTRIBUTE_MAYBE_UNUSED static ::testing::TestInfo* const    \
      |     ^
/nix/store/qis4x8vjbq81bbdlgpnss4c5fbkzzyb4-gtest-1.15.2-dev/include/gtest/internal/gtest-port.h:784:49: note: expanded from macro 'GTEST_INTERNAL_ATTRIBUTE_MAYBE_UNUSED'
  784 | #define GTEST_INTERNAL_ATTRIBUTE_MAYBE_UNUSED [[maybe_unused]]
      |                                                 ^
/tmp/nix-build-microsoft-gsl-4.1.0.drv-0/source/tests/at_tests.cpp:55:1: error: use of the 'maybe_unused' attribute is a C++17 extension [-Werror,-Wc++17-attribute-extensions]/tmp/nix-build-microsoft-gsl-4.1.0.drv-0/source/tests/byte_tests.cpp:
33:1: error: use of the 'maybe_unused' attribute is a C++17 extension [-Werror,-Wc++17-attribute-extensions]
   55 |    T33E | STTE(SaTt(_btyetset_st,e ssttsd,_ acroray)
      | ^
/nix/store/qis4x8vjbq81bbdlgpnss4c5fbkzzyb4-gtest-1.15.2-dev/include/gtest/gtest.h:2192:42: note: expanded from macro 'TEST'
 2192 | #define TEST(test_suite_name, test_name) GTEST_TEST(test_suite_name, test_name)
      |                                          ^
/nix/store/qis4x8vjbq81bbdlgpnss4c5fbkzzyb4-gtest-1.15.2-dev/include/gtest/gtest.h:2186:3: nstruction)
      | ^
/nix/store/qis4x8vjbq81bbdlgpnss4c5fbkzzyb4-gtest-1.15.2-dev/include/gtest/gtest.h:2192:42: note: expanded from macro 'TEST'
 2192 | #define TEST(test_suite_name, test_name) GTEST_TEST(tnote: esexpanded from macro 'GTEST_TEST't_
suite_name, test_name)
      |                                          ^
/nix/store/qis4x8vjbq81bbdlgpnss4c5fbkzzyb4-gtest-1.15.2-dev/include/gtest/gtest.h:2186: 32186: |    Gnote: TEexpanded from macro 'GTEST_TEST'ST
_TEST_(test_suite_name, test_ n2186a | m e ,G T:E:StTe_sTtEiSnTg_:(:tTeesstt_,s u\it
e      _| na  ^m
e, test_n/nix/store/qis4x8vjbq81bbdlgpnss4c5fbkzzyb4-gtest-1.15.2-dev/include/gtest/internal/gtest-internal.ha:m1504e:,5 :: :tenote: stexpanded from macro 'GTEST_TEST_'in
g::Test, \
      |   ^
/nix/store/qis4x8vjbq81bbdlgpnss4c5fbkzzyb4-gtest-1.15.2-dev/include/gtest/internal/gtest-internal.h:1504:5: note: expanded from macro 'GTEST_TEST_'
 1504 |     GTEST_INTERNAL_ATTRIBUTE_MAYBE_UNUSED stati c1504 |   : : t eGsTtEiSnTg_:I:NTTeEsRtNIAnLf_oA*T TRcIBUTE_MAYBE_UNUSED static ::testing::TestInofo* cnst    o\ns
t      |       ^ 
 \
      | /nix/store/qis4x8vjbq81bbdlgpnss4c5fbkzzyb4-gtest-1.15.2-dev/include/gtest/internal/gtest-port.h    ^:
784:49: note: /nix/store/qis4x8vjbq81bbdlgpnss4c5fbkzzyb4-gtest-1.15.2-dev/include/gtest/internal/gtest-port.h:expanded from macro 'GTEST_INTERNAL_ATTRIBUTE_MAYBE_UNUSED'784:
49: note: expanded from macro 'GTEST_INTERNAL_ATTRIBUTE_MAYBE_UNUSED'
  784 | #defi  n784e |  #GdTeEfSiTn_eI NGTTEERSNTA_LI_NATTETRRNIABLU_TAET_TMRAIYBBUET_EU_NMUASYEBDE _[U[NmUaSyEbDe _[u[nmuasyebde]_]un
u      s| ed                                                ^]
]
      |                              /tmp/nix-build-microsoft-gsl-4.1.0.drv-0/source/tests/owner_tests.cpp:35:                   ^1: 
error: use of the 'maybe_unused' attribute is a C++17 extension [-Werror,-Wc++17-attribute-extensions]
   35 | TEST(owner_tests, check_pointer_constraint)
      | ^
/nix/store/qis4x8vjbq81bbdlgpnss4c5fbkzzyb4-gtest-1.15.2-dev/include/gtest/gtest.h:2192:42: note: expanded from macro 'TEST'
 2192 | #define TEST(test_suite_name, test_name) GTEST_TEST(test_suite_name, test_name)
      |                                          ^
/nix/store/qis4x8vjbq81bbdlgpnss4c5fbkzzyb4-gtest-1.15.2-dev/include/gtest/gtest.h:2186:3: note: expanded from macro 'GTEST_TEST'
 2186 |   GTEST_TEST_(test_suite_name, test_name, ::testing::Test, \
      |   ^
/nix/store/qis4x8vjbq81bbdlgpnss4c5fbkzzyb4-gtest-1.15.2-dev/include/gtest/internal/gtest-internal.h:1504:5: note: expanded from macro 'GTEST_TEST_'
 1504 |     GTEST_INTERNAL_ATTRIBUTE_MAYBE_UNUSED static ::testing::TestInfo* const    \
      |     ^
/nix/store/qis4x8vjbq81bbdlgpnss4c5fbkzzyb4-gtest-1.15.2-dev/include/gtest/internal/gtest-port.h:784:49: note: expanded from macro 'GTEST_INTERNAL_ATTRIBUTE_MAYBE_UNUSED'
  784 | #define GTEST_INTERNAL_ATTRIBUTE_MAYBE_UNUSED [[maybe_unused]]
      |                                                 ^
/tmp/nix-build-microsoft-gsl-4.1.0.drv-0/source/tests/byte_tests.cpp:69:1: error: use of the 'maybe_unused' attribute is a C++17 extension [-Werror,-Wc++17-attribute-extensions]
   69 | TEST(byte_tests, bitwise_operations)
      | ^
/nix/store/qis4x8vjbq81bbdlgpnss4c5fbkzzyb4-gtest-1.15.2-dev/include/gtest/gtest.h:2192:42: note: expanded from macro 'TEST'
 2192 | #define TEST(test_suite_name, test_name) GTEST_TEST(test_suite_name, test_name)
      |                                          ^
/nix/store/qis4x8vjbq81bbdlgpnss4c5fbkzzyb4-gtest-1.15.2-dev/include/gtest/gtest.h:2186:3: note: expanded from macro 'GTEST_TEST'
 2186 |   GTEST_TEST_(test_suite_name, test_name, ::testing::Test, \
      |   ^
/nix/store/qis4x8vjbq81bbdlgpnss4c5fbkzzyb4-gtest-1.15.2-dev/include/gtest/internal/gtest-internal.h:1504:5: note: expanded from macro 'GTEST_TEST_'
 1504 |     GTEST_INTERNAL_ATTRIBUTE_MAYBE_UNUSED static ::testing::TestInfo* const    \
      |     ^
/nix/store/qis4x8vjbq81bbdlgpnss4c5fbkzzyb4-gtest-1.15.2-dev/include/gtest/internal/gtest-port.h:784:49: note: expanded from macro 'GTEST_INTERNAL_ATTRIBUTE_MAYBE_UNUSED'
  784 | #define GTEST_INTERNAL_ATTRIBUTE_MAYBE_UNUSED [[maybe_unused]]
      |                                                 ^
/tmp/nix-build-microsoft-gsl-4.1.0.drv-0/source/tests/at_tests.cpp:78:1: error: use of the 'maybe_unused' attribute is a C++17 extension [-Werror,-Wc++17-attribute-extensions]
   78 | TEST(at_tests, std_vector)
      | ^
/nix/store/qis4x8vjbq81bbdlgpnss4c5fbkzzyb4-gtest-1.15.2-dev/include/gtest/gtest.h:2192:42: note: expanded from macro 'TEST'
 2192 | #define TEST(test_suite_name, test_name) GTEST_TEST(test_suite_name, test_name)
      |                                          ^
/nix/store/qis4x8vjbq81bbdlgpnss4c5fbkzzyb4-gtest-1.15.2-dev/include/gtest/gtest.h:2186:3: note: expanded from macro 'GTEST_TEST'
 2186 |   GTEST_TEST_(test_suite_name, test_name, ::testing::Test, \
      |   ^
/nix/store/qis4x8vjbq81bbdlgpnss4c5fbkzzyb4-gtest-1.15.2-dev/include/gtest/internal/gtest-internal.h:1504:5: note: expanded from macro 'GTEST_TEST_'
 1504 |     GTEST_INTERNAL_ATTRIBUTE_MAYBE_UNUSED static ::testing::TestInfo* const    \
      |     ^
/nix/store/qis4x8vjbq81bbdlgpnss4c5fbkzzyb4-gtest-1.15.2-dev/include/gtest/internal/gtest-port.h:784:49: note: expanded from macro 'GTEST_INTERNAL_ATTRIBUTE_MAYBE_UNUSED'
  784 | #define GTEST_INTERNAL_ATTRIBUTE_MAYBE_UNUSED [[maybe_unused]]
      |                                                 ^
/tmp/nix-build-microsoft-gsl-4.1.0.drv-0/source/tests/byte_tests.cpp:105:1: error: use of the 'maybe_unused' attribute is a C++17 extension [-Werror,-Wc++17-attribute-extensions]
  105 | TEST(byte_tests, to_integer)
      | ^
/nix/store/qis4x8vjbq81bbdlgpnss4c5fbkzzyb4-gtest-1.15.2-dev/include/gtest/gtest.h:2192:42: note: expanded from macro 'TEST'
 2192 | #define TEST(test_suite_name, test_name) GTEST_TEST(test_suite_name, test_name)
      |                                          ^
/nix/store/qis4x8vjbq81bbdlgpnss4c5fbkzzyb4-gtest-1.15.2-dev/include/gtest/gtest.h:2186:3: note: expanded from macro 'GTEST_TEST'
 2186 |   GTEST_TEST_(test_suite_name, test_name, ::testing::Test, \
      |   ^
/nix/store/qis4x8vjbq81bbdlgpnss4c5fbkzzyb4-gtest-1.15.2-dev/include/gtest/internal/gtest-internal.h:1504:5: note: expanded from macro 'GTEST_TEST_'
 1504 |     GTEST_INTERNAL_ATTRIBUTE_MAYBE_UNUSED static ::testing::TestInfo* const    \
      |     ^
/nix/store/qis4x8vjbq81bbdlgpnss4c5fbkzzyb4-gtest-1.15.2-dev/include/gtest/internal/gtest-port.h:784:49: note: expanded from macro 'GTEST_INTERNAL_ATTRIBUTE_MAYBE_UNUSED'
  784 | #define GTEST_INTERNAL_ATTRIBUTE_MAYBE_UNUSED [[maybe_unused]]
      |                                                 ^
/tmp/nix-build-microsoft-gsl-4.1.0.drv-0/source/tests/span_compatibility_tests.cpp:72:1: error: use of the 'maybe_unused' attribute is a C++17 extension [-Werror,-Wc++17-attribute-extensions]
   72 | TEST(span_compatibility_tests, assertion_tests)
      | ^
/nix/store/qis4x8vjbq81bbdlgpnss4c5fbkzzyb4-gtest-1.15.2-dev/include/gtest/gtest.h:2192:42: note: expanded from macro 'TEST'
 2192 | #define TEST(test_suite_name, test_name) GTEST_TEST(test_suite_name, test_name)
      |                                          ^
/nix/store/qis4x8vjbq81bbdlgpnss4c5fbkzzyb4-gtest-1.15.2-dev/include/gtest/gtest.h:2186:3: note: expanded from macro 'GTEST_TEST'
 2186 |   GTEST_TEST_(test_suite_name, test_name, ::testing::Test, \
      |   ^
/nix/store/qis4x8vjbq81bbdlgpnss4c5fbkzzyb4-gtest-1.15.2-dev/include/gtest/internal/gtest-internal.h:1504:5: note: expanded from macro 'GTEST_TEST_'
 1504 |     GTEST_INTERNAL_ATTRIBUTE_MAYBE_UNUSED static ::testing::TestInfo* const    \
      |     ^
/nix/store/qis4x8vjbq81bbdlgpnss4c5fbkzzyb4-gtest-1.15.2-dev/include/gtest/internal/gtest-port.h:784:49: note: expanded from macro 'GTEST_INTERNAL_ATTRIBUTE_MAYBE_UNUSED'
  784 | #define GTEST_INTERNAL_ATTRIBUTE_MAYBE_UNUSED [[maybe_unused]]
      |                                                 ^
/tmp/nix-build-microsoft-gsl-4.1.0.drv-0/source/tests/byte_tests.cpp:123:1: error: use of the 'maybe_unused' attribute is a C++17 extension [-Werror,-Wc++17-attribute-extensions]
  123 | TEST(byte_tests, aliasing)
      | ^
/nix/store/qis4x8vjbq81bbdlgpnss4c5fbkzzyb4-gtest-1.15.2-dev/include/gtest/gtest.h:2192:42: note: expanded from macro 'TEST'
 2192 | #define TEST(test_suite_name, test_name) GTEST_TEST(test_suite_name, test_name)/tmp/nix-build-microsoft-gsl-4.1.0.drv-0/source/tests/notnull_tests.cpp:144:1: error: use of the 'maybe_unused' attribute is a C++17 extension [-Werror,-Wc++17-attribute-extensions]
  144 | TEST(notnull_tests, TestNotNullConstructors)
      | ^
/nix/store/qis4x8vjbq81bbdlgpnss4c5fbkzzyb4-gtest-1.15.2-dev/include/gtest/gtest.h:2192:42: note: expanded from macro 'TEST'
 2192 | #define TEST(test_suite_name, test_name) GTEST_TEST(test_suite_na
m      e| ,                                          ^t
est_name)/nix/store/qis4x8vjbq81bbdlgpnss4c5fbkzzyb4-gtest-1.15.2-dev/include/gtest/gtest.h:
2186      :| 3:                                         ^ 
note: /nix/store/qis4x8vjbq81bbdlgpnss4c5fbkzzyb4-gtest-1.15.2-dev/include/gtest/gtest.hexpanded from macro 'GTEST_TEST':2186
:3: note: expanded from macro 'GTEST_TEST'
 2186 |   GTE 2186 |   GTST_TEST_(test_suite_name, test_name, ::testing::Test, \
      |   ^
/nix/store/qis4x8vjbq81bbdlgpnss4c5fbkzzyb4-gtest-1.15.2-dev/include/gtest/internal/gtest-internal.h:1504:5: note: expanded from macro 'GTEST_TEST_'
 1504 |     GTEST_INTERNAL_ATTRIBUTE_MAYBE_UNUSED static ::testing::TestInfo* const    \
      |     ^
/nix/store/qis4x8vjbq81bbdlgpnss4c5fbkzzyb4-gtest-1.15.2-dev/include/gtest/internal/gtest-port.h:784:49: note: expanded from macro 'GTEST_INTERNAL_ATTRIBUTE_MAYBE_UNUSED'
  784 | #define GTEST_INTERNAL_ATTRIBUTE_MAYBE_UNUSED [[maybe_unused]]
      |                                                 ^
EST_TEST_(test_suite_name, test_name, ::testing::Test, \
      |   ^
/nix/store/qis4x8vjbq81bbdlgpnss4c5fbkzzyb4-gtest-1.15.2-dev/include/gtest/internal/gtest-internal.h:1504:5: note: expanded from macro 'GTEST_TEST_'
 1504 |     GTEST_INTERNAL_ATTRIBUTE_MAYBE_UNUSED static ::testing::TestInfo* const    \
      |     ^
/nix/store/qis4x8vjbq81bbdlgpnss4c5fbkzzyb4-gtest-1.15.2-dev/include/gtest/internal/gtest-port.h:784:49: note: expanded from macro 'GTEST_INTERNAL_ATTRIBUTE_MAYBE_UNUSED'
  784 | #define GTEST_INTERNAL_ATTRIBUTE_MAYBE_UNUSED [[maybe_unused]]
      |                                                 ^
/tmp/nix-build-microsoft-gsl-4.1.0.drv-0/source/tests/at_tests.cpp:101:1: error: use of the 'maybe_unused' attribute is a C++17 extension [-Werror,-Wc++17-attribute-extensions]
  101 | TEST(at_tests, InitializerList)
      | ^
/nix/store/qis4x8vjbq81bbdlgpnss4c5fbkzzyb4-gtest-1.15.2-dev/include/gtest/gtest.h:2192:42: note: expanded from macro 'TEST'
 2192 | #define TEST(test_suite_name, test_name) GTEST_TEST(test_suite_name, test_name)
      |                                          ^
/nix/store/qis4x8vjbq81bbdlgpnss4c5fbkzzyb4-gtest-1.15.2-dev/include/gtest/gtest.h:2186:3: note: expanded from macro 'GTEST_TEST'
 2186 |   GTEST_TEST_(test_suite_name, test_name, ::testing::Test, \
      |   ^
/nix/store/qis4x8vjbq81bbdlgpnss4c5fbkzzyb4-gtest-1.15.2-dev/include/gtest/internal/gtest-internal.h:1504:5: note: expanded from macro 'GTEST_TEST_'
 1504 |     GTEST_INTERNAL_ATTRIBUTE_MAYBE_UNUSED static ::testing::TestInfo* const    \
      |     ^
/nix/store/qis4x8vjbq81bbdlgpnss4c5fbkzzyb4-gtest-1.15.2-dev/include/gtest/internal/gtest-port.h:784:49: note: expanded from macro 'GTEST_INTERNAL_ATTRIBUTE_MAYBE_UNUSED'
  784 | #define GTEST_INTERNAL_ATTRIBUTE_MAYBE_UNUSED [[maybe_unused]]
      |                                                 ^
/tmp/nix-build-microsoft-gsl-4.1.0.drv-0/source/tests/notnull_tests.cpp:260:1: error: use of the 'maybe_unused' attribute is a C++17 extension [-Werror,-Wc++17-attribute-extensions]
  260 | TEST(notnull_tests, TestNotNullostream)
      | ^
/nix/store/qis4x8vjbq81bbdlgpnss4c5fbkzzyb4-gtest-1.15.2-dev/include/gtest/gtest.h:2192:42: note: expanded from macro 'TEST'
 2192 | #define TEST(test_suite_name, test_name) GTEST_TEST(test_suite_name, test_name)
      |                                          ^
/nix/store/qis4x8vjbq81bbdlgpnss4c5fbkzzyb4-gtest-1.15.2-dev/include/gtest/gtest.h:2186:3: note: expanded from macro 'GTEST_TEST'
 2186 |   GTEST_TEST_(test_suite_name, test_name, ::testing::Test, \
      |   ^
/nix/store/qis4x8vjbq81bbdlgpnss4c5fbkzzyb4-gtest-1.15.2-dev/include/gtest/internal/gtest-internal.h:1504:5: note: expanded from macro 'GTEST_TEST_'
 1504 | /tmp/nix-build-microsoft-gsl-4.1.0.drv-0/source/tests/algorithm_tests.cpp : 32 : 1G:T ESTerror: _INuse of the 'maybe_unused' attribute is a C++17 extension [-Werror,-Wc++17-attribute-extensions]T
   ERNAL_ATTRIBUTE_MAYBE_32UNUSED  | sTEST(algorithm_tests, same_type)
      | ^
/nix/store/qis4x8vjbq81bbdlgpnss4c5fbkzzyb4-gtest-1.15.2-dev/include/gtest/gtest.h:2192:42: note: expanded from macro 'TEST'
 2192 | #define TEST(test_suite_name, test_name) GTEST_TEST(test_suite_name, test_name)
      |                                          ^
/nix/store/qis4x8vjbq81bbdlgpnss4c5fbkzzyb4-gtest-1.15.2-dev/include/gtest/gtest.h:2186:3: note: expanded from macro 'GTEST_TEST'
 2186 |   GTEST_TEST_(test_suite_name, test_name, ::testing::Test, \
      |   ^
/nix/store/qis4x8vjbq81bbdlgpnss4c5fbkzzyb4-gtest-1.15.2-dev/include/gtest/internal/gtest-internal.h:1504:5: note: expanded from macro 'GTEST_TEST_'
 1504 |     GTEST_INTERNAL_ATTRIBUTE_MAYBE_UNUSED static ::testing::TestInfo* const    \
      |     ^
tatic/nix/store/qis4x8vjbq81bbdlgpnss4c5fbkzzyb4-gtest-1.15.2-dev/include/gtest/internal/gtest-port.h ::784::t49e:s tinnote: g:expanded from macro 'GTEST_INTERNAL_ATTRIBUTE_MAYBE_UNUSED':T
estInfo* const    \
      |     ^
/nix/store/qis4x8vjbq81bbdlgpnss4c5fbkzzyb4-gtest-1.15.2-dev/include/gtest/internal/gtest-port.h:784:49: note: expanded from macro 'GTEST_INTERNAL_ATTRIBUTE_MAYBE_UNUSED'
  784 | #define GTEST_INTERNAL_ATTRIBUTE_MAYBE_UNUSE  D784  | [#[dmeafyibnee_ uGnTuEsSeTd_]I]NT
E      R| NA                                                ^
L_ATTRIBUTE_MAYBE_UNUSED [[maybe_unused]]
      |                                                 ^
/tmp/nix-build-microsoft-gsl-4.1.0.drv-0/source/tests/notnull_tests.cpp:271:1: error: use of the 'maybe_unused' attribute is a C++17 extension [-Werror,-Wc++17-attribute-extensions]
  271 | TEST(notnull_tests, TestNotNullCasting)
      | ^
/nix/store/qis4x8vjbq81bbdlgpnss4c5fbkzzyb4-gtest-1.15.2-dev/include/gtest/gtest.h:2192:42: note: expanded from macro 'TEST'
 2192 | #define TEST(test_suite_name, test_name) GTEST_TEST(test_suite_name, test_name)
      |                                          ^
/nix/store/qis4x8vjbq81bbdlgpnss4c5fbkzzyb4-gtest-1.15.2-dev/include/gtest/gtest.h:2186:3: note: expanded from macro 'GTEST_TEST'
 2186 |   GTEST_TEST_(test_suite_name, test_name, ::testing::Test, \
      |   ^
/nix/store/qis4x8vjbq81bbdlgpnss4c5fbkzzyb4-gtest-1.15.2-dev/include/gtest/internal/gtest-internal.h:1504:5: note: expanded from macro 'GTEST_TEST_'
 1504 |     GTEST_INTERNAL_ATTRIBUTE_MAYBE_UNUSED static ::testing::TestInfo* const    \
      |     ^
/nix/store/qis4x8vjbq81bbdlgpnss4c5fbkzzyb4-gtest-1.15.2-dev/include/gtest/internal/gtest-port.h:784:49: note: expanded from macro 'GTEST_INTERNAL_ATTRIBUTE_MAYBE_UNUSED'
  784 | #define GTEST_INTERNAL_ATTRIBUTE_MAYBE_UNUSED [[maybe_unused]]
      |                                                 ^
/tmp/nix-build-microsoft-gsl-4.1.0.drv-0/source/tests/notnull_tests.cpp:294:1: error: use of the 'maybe_unused' attribute is a C++17 extension [-Werror,-Wc++17-attribute-extensions]
  294 | TEST(notnull_tests, TestNotNullAssignment)
      | ^
/nix/store/qis4x8vjbq81bbdlgpnss4c5fbkzzyb4-gtest-1.15.2-dev/include/gtest/gtest.h:2192:42: note: expanded from macro 'TEST'
 2192 | #define TEST(test_suite_name, test_name) GTEST_TEST(test_suite_name, test_name)
      |                                          ^
/nix/store/qis4x8vjbq81bbdlgpnss4c5fbkzzyb4-gtest-1.15.2-dev/include/gtest/gtest.h:2186:3: note: expanded from macro 'GTEST_TEST'
 2186 |   GTEST_TEST_(test_suite_name, test_name, ::testing::Test, \
      |   ^
/nix/store/qis4x8vjbq81bbdlgpnss4c5fbkzzyb4-gtest-1.15.2-dev/include/gtest/internal/gtest-internal.h:1504:5: note: expanded from macro 'GTEST_TEST_'
 1504 |     GTEST_INTERNAL_ATTRIBUTE_MAYBE_UNUSED static ::testing::TestInfo* const    \
      |     ^
/nix/store/qis4x8vjbq81bbdlgpnss4c5fbkzzyb4-gtest-1.15.2-dev/include/gtest/internal/gtest-port.h:784:49: note: expanded from macro 'GTEST_INTERNAL_ATTRIBUTE_MAYBE_UNUSED'
  784 | #define GTEST_INTERNAL_ATTRIBUTE_MAYBE_UNUSED [[maybe_unused]]
      |                                                 ^
/tmp/nix-build-microsoft-gsl-4.1.0.drv-0/source/tests/notnull_tests.cpp:310:1: error: use of the 'maybe_unused' attribute is a C++17 extension [-Werror,-Wc++17-attribute-extensions]
  310 | TEST(notnull_tests, TestNotNullRawPointerComparison)
      | ^
/nix/store/qis4x8vjbq81bbdlgpnss4c5fbkzzyb4-gtest-1.15.2-dev/include/gtest/gtest.h:2192:42: note: expanded from macro 'TEST'
 2192 | #define TEST(test_suite_name, test_name) GTEST_TEST(test_suite_name, test_name)
      |                                          ^
/nix/store/qis4x8vjbq81bbdlgpnss4c5fbkzzyb4-gtest-1.15.2-dev/include/gtest/gtest.h:2186:3: note: expanded from macro 'GTEST_TEST'
 2186 |   GTEST_TEST_(test_suite_name, test_name, ::testing::Test, \
      |   ^
/nix/store/qis4x8vjbq81bbdlgpnss4c5fbkzzyb4-gtest-1.15.2-dev/include/gtest/internal/gtest-internal.h:1504:5: note: expanded from macro 'GTEST_TEST_'
 1504 |     GTEST_INTERNAL_ATTRIBUTE_MAYBE_UNUSED static ::testing::TestInfo* const    \
      |     ^
/nix/store/qis4x8vjbq81bbdlgpnss4c5fbkzzyb4-gtest-1.15.2-dev/include/gtest/internal/gtest-port.h:784:49: note: expanded from macro 'GTEST_INTERNAL_ATTRIBUTE_MAYBE_UNUSED'
  784 | #define GTEST_INTERNAL_ATTRIBUTE_MAYBE_UNUSED [[maybe_unused]]
      |                                                 ^
/tmp/nix-build-microsoft-gsl-4.1.0.drv-0/source/tests/notnull_tests.cpp:338:1: error: use of the 'maybe_unused' attribute is a C++17 extension [-Werror,-Wc++17-attribute-extensions]
  338 | TEST(notnull_tests, TestNotNullDereferenceOperator)
      | ^
/nix/store/qis4x8vjbq81bbdlgpnss4c5fbkzzyb4-gtest-1.15.2-dev/include/gtest/gtest.h:2192:42: note: expanded from macro 'TEST'
 2192 | #define TEST(test_suite_name, test_name) GTEST_TEST(test_suite_name, test_name)
      |                                          ^
/nix/store/qis4x8vjbq81bbdlgpnss4c5fbkzzyb4-gtest-1.15.2-dev/include/gtest/gtest.h:2186:3: note: expanded from macro 'GTEST_TEST'
 2186 |   GTEST_TEST_(test_suite_name, test_name, ::testing::Test, \
      |   ^
/nix/store/qis4x8vjbq81bbdlgpnss4c5fbkzzyb4-gtest-1.15.2-dev/include/gtest/internal/gtest-internal.h:1504:5: note: expanded from macro 'GTEST_TEST_'
 1504 |     GTEST_INTERNAL_ATTRIBUTE_MAYBE_UNUSED static ::testing::TestInfo* const    \
      |     ^
/nix/store/qis4x8vjbq81bbdlgpnss4c5fbkzzyb4-gtest-1.15.2-dev/include/gtest/internal/gtest-port.h:784:49: note: expanded from macro 'GTEST_INTERNAL_ATTRIBUTE_MAYBE_UNUSED'
  784 | #define GTEST_INTERNAL_ATTRIBUTE_MAYBE_UNUSED [[maybe_unused]]
      |                                                 ^
/tmp/nix-build-microsoft-gsl-4.1.0.drv-0/source/tests/algorithm_tests.cpp:107:1: error: use of the 'maybe_unused' attribute is a C++17 extension [-Werror,-Wc++17-attribute-extensions]
  107 | TEST(algorithm_tests, compatible_type)
      | ^
/nix/store/qis4x8vjbq81bbdlgpnss4c5fbkzzyb4-gtest-1.15.2-dev/include/gtest/gtest.h:2192:42: note: expanded from macro 'TEST'
 2192 | #define TEST(test_suite_name, test_name) GTEST_TEST(test_suite_name, test_name)
      |                                          ^
/nix/store/qis4x8vjbq81bbdlgpnss4c5fbkzzyb4-gtest-1.15.2-dev/include/gtest/gtest.h:2186:3: note: expanded from macro 'GTEST_TEST'
 2186 |   GTEST_TEST_(test_suite_name, test_name, ::testing::Test, \
      |   ^
/nix/store/qis4x8vjbq81bbdlgpnss4c5fbkzzyb4-gtest-1.15.2-dev/include/gtest/internal/gtest-internal.h:1504:5: note: expanded from macro 'GTEST_TEST_'
 1504 |     GTEST_INTERNAL_ATTRIBUTE_MAYBE_UNUSED static ::testing::TestInfo* const    \
      |     ^
/nix/store/qis4x8vjbq81bbdlgpnss4c5fbkzzyb4-gtest-1.15.2-dev/include/gtest/internal/gtest-port.h:784:49: note: expanded from macro 'GTEST_INTERNAL_ATTRIBUTE_MAYBE_UNUSED'
  784 | #define GTEST_INTERNAL_ATTRIBUTE_MAYBE_UNUSED [[maybe_unused]]
      |                                                 ^
/tmp/nix-build-microsoft-gsl-4.1.0.drv-0/source/tests/notnull_tests.cpp:368:1: error: use of the 'maybe_unused' attribute is a C++17 extension [-Werror,-Wc++17-attribute-extensions]
  368 | TEST(notnull_tests, TestNotNullSharedPtrComparison)
      | ^
/nix/store/qis4x8vjbq81bbdlgpnss4c5fbkzzyb4-gtest-1.15.2-dev/include/gtest/gtest.h:2192:42: note: expanded from macro 'TEST'
 2192 | #define TEST(test_suite_name, test_name) GTEST_TEST(test_suite_name, test_name)
      |                                          ^
/nix/store/qis4x8vjbq81bbdlgpnss4c5fbkzzyb4-gtest-1.15.2-dev/include/gtest/gtest.h:2186:3: note: expanded from macro 'GTEST_TEST'
 2186 |   GTEST_TEST_(test_suite_name, test_name, ::testing::Test, \
      |   ^
/nix/store/qis4x8vjbq81bbdlgpnss4c5fbkzzyb4-gtest-1.15.2-dev/include/gtest/internal/gtest-internal.h:1504:5: note: expanded from macro 'GTEST_TEST_'
 1504 |     GTEST_INTERNAL_ATTRIBUTE_MAYBE_UNUSED static ::testing::TestInfo* const    \
      |     ^
/nix/store/qis4x8vjbq81bbdlgpnss4c5fbkzzyb4-gtest-1.15.2-dev/include/gtest/internal/gtest-port.h:784:49: note: expanded from macro 'GTEST_INTERNAL_ATTRIBUTE_MAYBE_UNUSED'
  784 | #define GTEST_INTERNAL_ATTRIBUTE_MAYBE_UNUSED [[maybe_unused]]
      |                                                 ^
/tmp/nix-build-microsoft-gsl-4.1.0.drv-0/source/tests/algorithm_tests.cpp:201:1: error: use of the 'maybe_unused' attribute is a C++17 extension [-Werror,-Wc++17-attribute-extensions]
  201 | TEST(algorithm_tests, small_destination_span)
      | ^
/nix/store/qis4x8vjbq81bbdlgpnss4c5fbkzzyb4-gtest-1.15.2-dev/include/gtest/gtest.h:2192:42: note: expanded from macro 'TEST'
 2192 | #define TEST(test_suite_name, test_name) GTEST_TEST(test_suite_name, test_name)
      |                                          ^
/nix/store/qis4x8vjbq81bbdlgpnss4c5fbkzzyb4-gtest-1.15.2-dev/include/gtest/gtest.h:2186:3: note: expanded from macro 'GTEST_TEST'
 2186 |   GTEST_TEST_(test_suite_name, test_name, ::testing::Test, \
      |   ^
/nix/store/qis4x8vjbq81bbdlgpnss4c5fbkzzyb4-gtest-1.15.2-dev/include/gtest/internal/gtest-internal.h:1504:5: note: expanded from macro 'GTEST_TEST_'
 1504 |     GTEST_INTERNAL_ATTRIBUTE_MAYBE_UNUSED static ::testing::TestInfo* const    \
      |     ^
/nix/store/qis4x8vjbq81bbdlgpnss4c5fbkzzyb4-gtest-1.15.2-dev/include/gtest/internal/gtest-port.h:784:49: note: expanded from macro 'GTEST_INTERNAL_ATTRIBUTE_MAYBE_UNUSED'
  784 | #define GTEST_INTERNAL_ATTRIBUTE_MAYBE_UNUSED [[maybe_unused]]
      |                                                 ^
/tmp/nix-build-microsoft-gsl-4.1.0.drv-0/source/tests/notnull_tests.cpp:399:1: error: use of the 'maybe_unused' attribute is a C++17 extension [-Werror,-Wc++17-attribute-extensions]
  399 | TEST(notnull_tests, TestNotNullCustomPtrComparison)
      | ^
/nix/store/qis4x8vjbq81bbdlgpnss4c5fbkzzyb4-gtest-1.15.2-dev/include/gtest/gtest.h:2192:42: note: expanded from macro 'TEST'
 2192 | #define TEST(test_suite_name, test_name) GTEST_TEST(test_suite_name, test_name)
      |                                          ^
/nix/store/qis4x8vjbq81bbdlgpnss4c5fbkzzyb4-gtest-1.15.2-dev/include/gtest/gtest.h:2186:3: note: expanded from macro 'GTEST_TEST'
 2186 |   GTEST_TEST_(test_suite_name, test_name, ::testing::Test, \
      |   ^
/nix/store/qis4x8vjbq81bbdlgpnss4c5fbkzzyb4-gtest-1.15.2-dev/include/gtest/internal/gtest-internal.h:1504:5: note: expanded from macro 'GTEST_TEST_'
 1504 |     GTEST_INTERNAL_ATTRIBUTE_MAYBE_UNUSED static ::testing::TestInfo* const    \
      |     ^
/nix/store/qis4x8vjbq81bbdlgpnss4c5fbkzzyb4-gtest-1.15.2-dev/include/gtest/internal/gtest-port.h:784:49: note: expanded from macro 'GTEST_INTERNAL_ATTRIBUTE_MAYBE_UNUSED'
  784 | #define GTEST_INTERNAL_ATTRIBUTE_MAYBE_UNUSED [[maybe_unused]]
      |                                                 ^
/tmp/nix-build-microsoft-gsl-4.1.0.drv-0/source/tests/notnull_tests.cpp:531:1: error: use of the 'maybe_unused' attribute is a C++17 extension [-Werror,-Wc++17-attribute-extensions]
  531 | TEST(notnull_tests, TestMakeNotNull)
      | ^
/nix/store/qis4x8vjbq81bbdlgpnss4c5fbkzzyb4-gtest-1.15.2-dev/include/gtest/gtest.h:2192:42: note: expanded from macro 'TEST'
 2192 | #define TEST(test_suite_name, test_name) GTEST_TEST(test_suite_name, test_name)
      |                                          ^
/nix/store/qis4x8vjbq81bbdlgpnss4c5fbkzzyb4-gtest-1.15.2-dev/include/gtest/gtest.h:2186:3: note: expanded from macro 'GTEST_TEST'
 2186 |   GTEST_TEST_(test_suite_name, test_name, ::testing::Test, \
      |   ^
/nix/store/qis4x8vjbq81bbdlgpnss4c5fbkzzyb4-gtest-1.15.2-dev/include/gtest/internal/gtest-internal.h:1504:5: note: expanded from macro 'GTEST_TEST_'
 1504 |     GTEST_INTERNAL_ATTRIBUTE_MAYBE_UNUSED static ::testing::TestInfo* const    \
      |     ^
/nix/store/qis4x8vjbq81bbdlgpnss4c5fbkzzyb4-gtest-1.15.2-dev/include/gtest/internal/gtest-port.h:784:49: note: expanded from macro 'GTEST_INTERNAL_ATTRIBUTE_MAYBE_UNUSED'
  784 | #define GTEST_INTERNAL_ATTRIBUTE_MAYBE_UNUSED [[maybe_unused]]
      |                                                 ^
/tmp/nix-build-microsoft-gsl-4.1.0.drv-0/source/tests/notnull_tests.cpp:619:1: error: use of the 'maybe_unused' attribute is a C++17 extension [-Werror,-Wc++17-attribute-extensions]
  619 | TEST(notnull_tests, TestStdHash)
      | ^
/nix/store/qis4x8vjbq81bbdlgpnss4c5fbkzzyb4-gtest-1.15.2-dev/include/gtest/gtest.h:2192:42: note: expanded from macro 'TEST'
 2192 | #define TEST(test_suite_name, test_name) GTEST_TEST(test_suite_name, test_name)
      |                                          ^
/nix/store/qis4x8vjbq81bbdlgpnss4c5fbkzzyb4-gtest-1.15.2-dev/include/gtest/gtest.h:2186:3: note: expanded from macro 'GTEST_TEST'
 2186 |   GTEST_TEST_(test_suite_name, test_name, ::testing::Test, \
      |   ^
/nix/store/qis4x8vjbq81bbdlgpnss4c5fbkzzyb4-gtest-1.15.2-dev/include/gtest/internal/gtest-internal.h:1504:5: note: expanded from macro 'GTEST_TEST_'
 1504 |     GTEST_INTERNAL_ATTRIBUTE_MAYBE_UNUSED static ::testing::TestInfo* const    \
      |     ^
/nix/store/qis4x8vjbq81bbdlgpnss4c5fbkzzyb4-gtest-1.15.2-dev/include/gtest/internal/gtest-port.h:784:49: note: expanded from macro 'GTEST_INTERNAL_ATTRIBUTE_MAYBE_UNUSED'
  784 | #define GTEST_INTERNAL_ATTRIBUTE_MAYBE_UNUSED [[maybe_unused]]
      |                                                 ^
2 errors generated.
2 errors generated.
make[2]: *** [tests/CMakeFiles/gsl_tests.dir/build.make:146: tests/CMakeFiles/gsl_tests.dir/owner_tests.cpp.o] Error 1
make[2]: *** Waiting for unfinished jobs....
4 errors generated.
make[2]: *** [tests/CMakeFiles/gsl_tests.dir/build.make:90: tests/CMakeFiles/gsl_tests.dir/assertion_tests.cpp.o] Error 1
make[2]: *** [tests/CMakeFiles/gsl_tests.dir/build.make:118: tests/CMakeFiles/gsl_tests.dir/byte_tests.cpp.o] Error 1
4 errors generated.
make[2]: *** [tests/CMakeFiles/gsl_tests.dir/build.make:104: tests/CMakeFiles/gsl_tests.dir/at_tests.cpp.o] Error 1
3 errors generated.
make[2]: *** [tests/CMakeFiles/gsl_tests.dir/build.make:76: tests/CMakeFiles/gsl_tests.dir/algorithm_tests.cpp.o] Error 1
[ 64%] Built target gsl_noexcept_tests
10 errors generated.
make[2]: *** [tests/CMakeFiles/gsl_tests.dir/build.make:132: tests/CMakeFiles/gsl_tests.dir/notnull_tests.cpp.o] Error 1
1 error generated.
make[2]: *** [tests/CMakeFiles/gsl_tests.dir/build.make:160: tests/CMakeFiles/gsl_tests.dir/span_compatibility_tests.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:118: tests/CMakeFiles/gsl_tests.dir/all] Error 2
make: *** [Makefile:146: all] Error 2

this diff removes the warning.

diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt
index 9de2519..59d6732 100644
--- a/tests/CMakeLists.txt
+++ b/tests/CMakeLists.txt
@@ -139,6 +139,7 @@ else()
         -Wno-deprecated-declarations # Allow tests for [[deprecated]] elements
         $<$<OR:$<CXX_COMPILER_ID:Clang>,$<CXX_COMPILER_ID:AppleClang>>:
           -Weverything
+          -Wno-c++17-attribute-extensions
           -Wno-c++98-compat
           -Wno-c++98-compat-pedantic
           -Wno-missing-braces
@carsonRadtke
Copy link
Collaborator

Thanks for the issue report!

This looks like the same problem I ran into when updating googletest and they have no interest in maintaining C++14 compatibility (despite their README).

-Wno-c++17-attribute-extensions won't work for all compilers (i.e. pre-C++17 compilers). If you need to stick to C++14, googletest 1.14.0 what we use for our testing. Otherwise, you could try setting -DGSL_CXX_STANDARD=17 (or whichever version you want) when invoking cmake. Depending on your needs -DGSL_TEST=0 is also an option.

I don't think there is anything actionable from our side. This is an issue between googletest and C++14.

@github-project-automation github-project-automation bot moved this from New to Won't Fix in Microsoft/GSL Active Issues Dec 23, 2024
@carsonRadtke carsonRadtke closed this as not planned Won't fix, can't repro, duplicate, stale Dec 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Won't Fix
Development

No branches or pull requests

2 participants