suppress compiler errors stemming from bugged warning#39
Conversation
cgilmour
left a comment
There was a problem hiding this comment.
Approved, and it'll be good when the hack/workaround can be removed in the future.
| set(CMAKE_CXX_STANDARD_REQUIRED ON) | ||
| set(CMAKE_CXX_EXTENSIONS OFF) | ||
|
|
||
| # This warning has a false positive. See |
There was a problem hiding this comment.
It'd be nice to have an easy / automated way to know when this can be removed again.
But it's not worth putting additional effort into it.
There was a problem hiding this comment.
CMake has a feature that allows the output of a program to be used as the value of a variable.
I wrote a bin/spurious-warning script that uses g++ and grep to demonstrate whether the spurious warning is produced. But, I had trouble coming up with a minimum reproducing program. In particular, the snippet in the linked bugzilla report didn't trigger the warning in GCC 12 (which is what recent Alpines use).
You're right, it's not worth putting additional effort into it.
|
Thanks for the review! |
I previously made this change to nginx-datadog, which builds dd-trace-cpp as part of its build. I didn't make the corresponding change in dd-trace-cpp itself because the build image that we use for CI isn't based on Alpine, which packages a newer GCC that has this bug.