https://gcc.gnu.org/bugzilla/show_bug.cgi?id=116178
--- Comment #12 from Jonathan Wakely <redi at gcc dot gnu.org> --- So autoconf and cmake both already have a way to only add a -std option conditionally, but if you use that and it selects an unstable release like -std=c++26 in GCC 14, then that's for you to deal with (if it matters ... which depends on which symbols you use, and if you rebuild the world on compiler upgrades anyway). For the CI case, maybe we could make this output easier to parse so your CI jobs can decide on a flag to use: $ gcc --help=c++ -Q | grep .-std -fhonor-std [disabled] -std=c++03 -std=c++98 -std=c++0x -std=c++11 -std=c++11 [disabled] -std=c++14 [disabled] -std=c++17 [disabled] -std=c++1y -std=c++14 -std=c++1z -std=c++17 -std=c++20 [disabled] -std=c++23 [disabled] -std=c++2a -std=c++20 -std=c++2b -std=c++23 -std=c++98 [disabled] -std=gnu++03 -std=gnu++98 -std=gnu++0x -std=gnu++11 -std=gnu++11 [disabled] -std=gnu++14 [disabled] -std=gnu++17 [disabled] -std=gnu++1y -std=gnu++14 -std=gnu++1z -std=gnu++17 -std=gnu++20 [disabled] -std=gnu++23 [disabled] -std=gnu++2a -std=gnu++20 -std=gnu++2b -std=gnu++23 -std=gnu++98 [disabled] If it's just something you use in CI it can't be hardcoded into the build system anyway, so you need some way to override it like CXXFLAGS=-std=c++23 Or we could add -std=c++-move-fast-and-break-things so you don't need to do that parsing.