Skip to content

Commit

Permalink
Enable -Wc++17-compat-pedantic to see incompatibilities with C++17.
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 718496081
  • Loading branch information
fniksic authored and copybara-github committed Jan 23, 2025
1 parent ce1164d commit a35d2da
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions .bazelrc
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,15 @@ build --action_env=CXX=clang++

# Use the C++17 standard.
build --cxxopt=-std=c++17
# ...But disable warnings about C++20 extensions.
build --cxxopt=-Wno-c++20-extensions
# Warn about the extensions that are not supported in C++17.
# TODO(b/391433873): Turn warnings into errors once existing warnings are fixed.
build --cxxopt=-Wc++17-compat-pedantic
# Required by the cc_fuzztest_grammar_library rule, which uses the
# "exec configuration" (https://bazel.build/reference/be/general#cross-compilation-considerations).
# The --cxxopt flag does not apply to the exec configuration, only the
# --host_cxxopt flag (https://bazel.build/docs/user-manual#host-cxxopt).
build --host_cxxopt=-std=c++17
build --host_cxxopt=-Wc++17-compat-pedantic

# Build GoogleTest with ABSL support.
build --define absl=1
Expand Down

0 comments on commit a35d2da

Please sign in to comment.