suppress compiler errors stemming from bugged warning by dgoffredo · Pull Request #39 · DataDog/dd-trace-cpp

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.