On Sat, Oct 26, 2024 at 04:29:17PM -0500, Steven Robbins wrote:
> Hello,
> 
> On Saturday, October 26, 2024 2:20:05 P.M. CDT Andrey Rakhmatullin wrote:
> > Control: reassign -1 libgtest-dev 1.15.2-1
> > Control: affects -1 libmsgsl-dev
> 
> > That macro in libgtest-dev indeed contains a switch statement without a
> > default label, reassigning.
> 
> The code in question is test code written for libmsgsl-dev, that is compiled 
> using options that produce an error if a switch statement lacks a default 
> label.  Is that correct?  

The code in question is the GTEST_DEATH_TEST_ macro defined in
/usr/include/gtest/internal/gtest-death-test-internal.h , test code
written for libmsgsl-dev just has EXPECT_DEATH() calls.

The code is compiled like this:
/usr/bin/clang++  -isystem 
/tmp/autopkgtest.lG90Bd/build.QNu/src/tests/googletest/googletest/include 
-std=c++20 -stdlib=libc++ -O3 -DNDEBUG -fno-strict-aliasing -Wall -Wcast-align 
-Wconversion -Wctor-dtor-privacy -Werror -Wextra -Wpedantic -Wshadow 
-Wsign-conversion -Wno-deprecated-declarations -Weverything -Wno-c++98-compat 
-Wno-c++98-compat-pedantic -Wno-missing-braces -Wno-covered-switch-default 
-Wno-global-constructors -Wno-missing-prototypes -Wno-padded 
-Wno-unknown-attributes -Wno-used-but-marked-unused -Wno-weak-vtables 
-Wno-unsafe-buffer-usage -MD -MT 
CMakeFiles/gsl_tests.dir/string_span_tests.cpp.o -MF 
CMakeFiles/gsl_tests.dir/string_span_tests.cpp.o.d -o 
CMakeFiles/gsl_tests.dir/string_span_tests.cpp.o -c 
/tmp/autopkgtest.lG90Bd/build.QNu/src/tests/string_span_tests.cpp
so it looks like -Wswitch-default is enabled by default in the compiler.

I may be very wrong but to me it looks like the gtest macro needs changes.

-- 
WBR, wRAR

Attachment: signature.asc
Description: PGP signature

Reply via email to