I self built gcc 7 to try out some new c++17 features.
When I built the code, I saw hundred lines of warnings, saying certain features are available only when -std=c++1z (I have already specified -std=c++1z in the build command line and I tried gnu++1z too)
I want to silence this warning. when using clang 4, there was an option -Wno-c++1z-extensions
but this option is not recognized by gcc.
I have root caused the reason for my problem.
It's because I set -std=c++17 with cmake. and I also have included Qt5. Qt5 settings overwrote my -std=c++17. With make VERBOSE=1, I could see both -std=c++17 and -std=c++14.
This confuses the compiler.
the problem is related to https://gitlab.kitware.com/cmake/cmake/issues/16468
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With