diff options
author | Dino Radakovic <dinor@google.com> | 2024-03-15 14:36:31 -0700 |
---|---|---|
committer | Copybara-Service <copybara-worker@google.com> | 2024-03-15 14:37:38 -0700 |
commit | 56d3f227154af7a646302ae4a0891f14a2d3616b (patch) | |
tree | c58ea6311696d1861184620d61e51a2931a226a6 /absl/container/internal/layout_benchmark.cc | |
parent | 153186b6931d0755448da8d200e1b8e43acede48 (diff) | |
download | abseil-56d3f227154af7a646302ae4a0891f14a2d3616b.tar.gz abseil-56d3f227154af7a646302ae4a0891f14a2d3616b.tar.bz2 abseil-56d3f227154af7a646302ae4a0891f14a2d3616b.zip |
`layout`: Mark parameter of Slices with ABSL_ATTRIBUTE_UNUSED, remove old workaround
The workaround was added for a bug in GCC < 6.1., which had since been fixed. Abseil only [supports](https://github.com/google/oss-policies-info/blob/9a9bfe8a4a12be20757497074fc2f0ecb77438ad/foundational-cxx-support-matrix.md) GCC > 7.3.1.
However, removing the workaround still trips even more recent GCC, such as 13.1. When `SizeSeq` is empty, `p` is not actually used.
Marking it as `ABSL_ATTRIBUTE_UNUSED` silences the GCC warning for that case too.
We could disable `Slices` altogether when `SizeSeq` is empty, but that would be a breaking change (even though this API is internal), and possibly hurt generic programming use (they'd have to check if their parameter packs are empty).
PiperOrigin-RevId: 616245873
Change-Id: I77f7b0b921dfd63fb01c5223851ad1d8a7da233b
Diffstat (limited to 'absl/container/internal/layout_benchmark.cc')
0 files changed, 0 insertions, 0 deletions