-
Notifications
You must be signed in to change notification settings - Fork 4.1k
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
Compilation failure in C++ runfiles.h under Werror=shadow #16796
Labels
Comments
2 tasks
@bazel-io flag |
bazel-io
added
the
potential release blocker
Flagged by community members using "@bazel-io flag". Should be added to a release blocker milestone
label
Nov 18, 2022
@jwnimmer-tri Thanks for the report. Does #16801 look reasonable to you? |
@bazel-io fork 6.0.0 |
bazel-io
removed
the
potential release blocker
Flagged by community members using "@bazel-io flag". Should be added to a release blocker milestone
label
Nov 28, 2022
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Description of the bug:
This commit at 8f28513 introduces a typo in the
Runfiles
constructor:bazel/tools/cpp/runfiles/runfiles_src.h
Lines 193 to 203 in 44918c5
Note that the argument name on L198 is
std::string source_repository_
with an underscore; only member fields should end with an underscore.When compiled using
-Werror=shadow
, GCC fails:This is from GCC 9.4.0 on Ubuntu 20.04, but I suspect most all versions would likewise fail.
What's the simplest, easiest way to reproduce this bug? Please provide a minimal example if possible.
Any C++ code that does
#include "tools/cpp/runfiles/runfiles.h"
built withbazel build --copt=-Werror=shadow
should demonstrate this. I can provide a full repro if needed, but it doesn't seem necessary in this case.Which operating system are you running Bazel on?
Ubuntu 20.04
What is the output of
bazel info release
?6.0.0rc2
If
bazel info release
returnsdevelopment version
or(@non-git)
, tell us how you built Bazel.No response
What's the output of
git remote get-url origin; git rev-parse master; git rev-parse HEAD
?No response
Have you found anything relevant by searching the web?
No response
Any other information, logs, or outputs that you want to share?
This is a regression in the 6.0.0 release candidate.
The text was updated successfully, but these errors were encountered: