Repository navigation
Add cpp warnings features. - #33
Merged
Merged
Conversation
Add cpp warnings features.
nradakovic
force-pushed
the
nira_add_warnings_features
branch
from
August 17, 2026 19:53
66888a2 to
d3d2482
Compare
nradakovic
marked this pull request as ready for review
August 20, 2026 12:52
There was a problem hiding this comment.
Pull request overview
Adds a centralized, Bazel rules_cc-based warning policy for GCC toolchains, exposing warning “levels” and a separate -Werror toggle intended for use across S-CORE C/C++ builds.
Changes:
- Introduces GCC warning
cc_featuretargets forminimal,strict,all, pluswarnings_as_errors. - Adds OS-specific GCC
-W...flag lists for Linux and QNX and composes them viacc_args_listwithselect()on@platforms//os. - Documents the warning feature architecture and the intent/semantics of each warning level.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| warnings/gcc/features/BUILD | Defines public GCC cc_feature targets for warning levels and warnings_as_errors. |
| warnings/gcc/args/BUILD | Composes per-OS warning arg targets via cc_args_list and select() by OS. |
| warnings/gcc/args/linux/BUILD | Linux-specific GCC warning flag lists for minimal/strict/all and -Werror. |
| warnings/gcc/args/qnx/BUILD | QNX-specific GCC warning flag lists for minimal/strict/all and -Werror. |
| docs/warnings.md | Documents the warning feature hierarchy, flag lists, and intended usage. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
nradakovic
force-pushed
the
nira_add_warnings_features
branch
from
August 20, 2026 13:06
4dcd9de to
63ce2e9
Compare
antonkri
previously approved these changes
Aug 20, 2026
Add proper documentation for warnings features explaining each feature which flags are including and for which platform feature is meant.
nradakovic
force-pushed
the
nira_add_warnings_features
branch
from
August 24, 2026 11:15
63ce2e9 to
02eb27d
Compare
AlexanderLanin
previously approved these changes
Aug 24, 2026
| cc_feature( | ||
| name = level + "_warnings", | ||
| args = ["@score_cpp_policies//warnings/gcc/args:{}_warnings_args".format(level)], | ||
| feature_name = level + "_warnings", |
Comment on lines
+7
to
+8
| > **Note:** If you're using `score_bazel_cpp_toolchains`, keep in mind that | ||
| > these warning features require version `1.0.0` or above. |
| ], | ||
| args = [ | ||
| "-Waddress", | ||
| "-Warray-bounds=1", |
Comment on lines
+24
to
+28
| cc_feature( | ||
| name = level + "_warnings", | ||
| args = ["@score_cpp_policies//warnings/gcc/args:{}_warnings_args".format(level)], | ||
| feature_name = level + "_warnings", | ||
| implies = [_WARNING_LEVELS[i - 1] + "_warnings"] if i > 0 else [], |
Member
Author
There was a problem hiding this comment.
We know. For now no new tests are added.
| load("@rules_cc//cc/toolchains:args.bzl", "cc_args") | ||
|
|
||
| # -------------------------------------------------------------------------------- | ||
| # All minimal compiler warnings (enabled by default). |
|
|
||
| | Feature | Meaning | | ||
| |---|---| | ||
| | `minimal_warnings` | Baseline warnings enabled by default; low false-positive rate. | |
The all warnings feature name was not aligned with toolchain module. With this change all docs are aligned.
AlexanderLanin
approved these changes
Aug 26, 2026
Closed
3 tasks done
This was
linked to
issues
Aug 26, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add cpp warnings features.