-
Notifications
You must be signed in to change notification settings - Fork 78
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
Test targets compile failed for the [-Werror=uninitialized] compile option for non MSVC compiler(gcc11.2) #36
Comments
@zxhcho Thank you for your feedback! We already have pipelines running on Ubuntu (see Actions) that build the tests with GCC and did not notice any issue so far. As you mentioned MSVC, are you using GCC on Windows? If so, could you double check if CMake is properly configured with your compiler? If this issue persists and the environment is confirmed to be good, please feel free to let us know more about how your compiler and toolchains are configured so that we can repro it and help investigate further. |
I can confirm that the tests compile on GCC 11.1 (via Docker image gcc:11.1) with |
Ok, I build it on |
Lines 420 to 429 in 531dfcc
Currently self-move-assignment can result in reading |
@frederick-vs-ja I did not notice it is a UB of |
The default tag
BUILD_TESTING
is set asON
for the project, and there is antarget_compile_options(msft_proxy_tests PRIVATE -Wall -Wextra -Wpedantic -Werror)
inCMakeLists.txt
of test for non MSVC compiler, so when I compile the code ingcc11.2
, the test cases will fail for:error: ‘p.pro::proxy<{anonymous}::TestFacade>::meta_’ is used uninitialized [-Werror=uninitialized]
[build] 323 | if (rhs.meta_ != nullptr) {
[build] | ~~~~^~~~~
proxy_lifetime_tests.cpp: In member function ‘virtual void ProxyLifetimeTests_TestMoveAssignment_FromNull_ToSelf_Test::TestBody()’:
proxy_lifetime_tests.cpp:692:26: note: ‘p’ declared here
[build] 692 | pro::proxy p;
and a lot of Werror ...
The text was updated successfully, but these errors were encountered: