Silence gcc overloaded-virtual warning in FieldBackedMapImpl #1048
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.
gcc complains about FieldBackedMapImpl::ListKeys when overloaded-virtual check is enabled. When using -Werror, warnings like this are converted to errors breaking builds.
That's what happened to gcc build of Envoy a while back. The issue in Envoy was fixed by introducing a patch for cel-cpp that was applied to the source during Envoy build (see
envoyproxy/envoy#31814).
Unfortunately during cel-cpp version update in Envoy instead of updating the patch, dropping the parts that are not needed anymore, we dropped the whole cep-cpp patch all together in
envoyproxy/envoy#36661. And now gcc can't build Envoy again.
This change makes the change to silence the gcc warning in the cel-cpp codebase, which hopefully will be a bit more durable than maintaing a patch on the Envoy side.
The change is not very invasive (just a using declaration), plus I can see at least another place in the code that does the same to deal with gcc warning (see
cel-cpp/tools/flatbuffers_backed_impl.h
Lines 27 to 28 in 61d0334
Thank you.