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

Building no-warning-test fails with -Og in CXXFLAGS #3711

Closed
Peter-Levine opened this issue Oct 3, 2017 · 0 comments
Closed

Building no-warning-test fails with -Og in CXXFLAGS #3711

Peter-Levine opened this issue Oct 3, 2017 · 0 comments
Assignees
Labels

Comments

@Peter-Levine
Copy link

Peter-Levine commented Oct 3, 2017

When building with GCC, inclusion of -Og in CXXFLAGS causes make check to fail with errors such as:

In file included from google/protobuf/compiler/cpp/cpp_test_bad_identifiers.pb.cc:5:0:
./google/protobuf/compiler/cpp/cpp_test_bad_identifiers.pb.h: In member function ‘virtual bool protobuf_unittest::TestConflictingEnumNames::MergePartialFromCodedStream(google::protobuf::io::CodedInputStream*)’:
./google/protobuf/compiler/cpp/cpp_test_bad_identifiers.pb.h:3798:21: error: ‘value’ may be used uninitialized in this function [-Werror=maybe-uninitialized]
   conflicting_enum_ = value;
   ~~~~~~~~~~~~~~~~~~^~~~~~~
google/protobuf/compiler/cpp/cpp_test_bad_identifiers.pb.cc:6765:15: note: ‘value’ was declared here
           int value;
               ^~~~~

This appears to be related to Bug 58455 - spurious "may be used uninitialized" warning with -Og and Bug 42145 - bogus "may be used uninitialized" (a || b converted to a|b). As part of protobuf gets built with -Werror, such spurious warnings become fatal.

Tested with protobuf-3.3.0 using GCC-5.4.0 and GCC-6.4.0.

See also Bug 618150 - dev-libs/protobuf-3.3.0 - error: 'value' may be used uninitialized in this function [-Werror=maybe-uninitialized]

@Peter-Levine Peter-Levine changed the title Build fails with -Og in CXXFLAGS no-warning-test fails with -Og in CXXFLAGS Oct 3, 2017
@Peter-Levine Peter-Levine changed the title no-warning-test fails with -Og in CXXFLAGS Building no-warning-test fails with -Og in CXXFLAGS Oct 3, 2017
@TeBoring TeBoring added the bug label Dec 11, 2017
@TeBoring TeBoring added this to Backlog in Fixit Q4`17 (P2 Bugs) via automation Dec 11, 2017
@TeBoring TeBoring self-assigned this Dec 11, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
No open projects
Development

No branches or pull requests

2 participants