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

Update bundled gtest to 1.11.0 to avoid fatal maybe-uninitialized error with GCC 11 #1081

Closed
The-Compiler opened this issue Sep 3, 2021 · 0 comments · Fixed by #1083
Closed
Labels
bug Something isn't working

Comments

@The-Compiler
Copy link
Contributor

Running make simulator-test locally on Archlinux (GCC 11.1.0) fails with:

In file included from ../../googletest/src/gtest-all.cc:42:
../../googletest/src/gtest-death-test.cc: In function ‘bool testing::internal::StackGrowsDown()’:
../../googletest/src/gtest-death-test.cc:1301:24: error: ‘dummy’ may be used uninitialized [-Werror=maybe-uninitialized]
 1301 |   StackLowerThanAddress(&dummy, &result);
      |   ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~
../../googletest/src/gtest-death-test.cc:1290:13: note: by argument 1 of type ‘const void*’ to ‘void testing::internal::StackLowerThanAddress(const void*, bool*)’ declared here
 1290 | static void StackLowerThanAddress(const void* ptr, bool* result) {
      |             ^~~~~~~~~~~~~~~~~~~~~
../../googletest/src/gtest-death-test.cc:1299:7: note: ‘dummy’ declared here
 1299 |   int dummy;
      |       ^~~~~
cc1plus: all warnings being treated as errors

It looks like this was reported in and fixed for gtest 1.11.0:

@The-Compiler The-Compiler added the bug Something isn't working label Sep 3, 2021
@obra obra closed this as completed in #1083 Sep 3, 2021
obra pushed a commit that referenced this issue Sep 22, 2021
Fixes #1081

Signed-off-by: Florian Bruhin <me@the-compiler.org>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant