From: Jason Merrill Date: Tue, 1 Oct 2024 14:58:35 +0000 (-0400) Subject: c++: don't advertise C++20 concepts in C++14 X-Git-Tag: basepoints/gcc-16~5553 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=1c9b440bf6768c1053101c4a473f5fc9757f52a5;p=thirdparty%2Fgcc.git c++: don't advertise C++20 concepts in C++14 There have been various problems with -std=c++14 -fconcepts; let's stop defining the feature test macro in that case. gcc/c-family/ChangeLog: * c-cppbuiltin.cc (c_cpp_builtins): Don't define __cpp_concepts before C++17. --- diff --git a/gcc/c-family/c-cppbuiltin.cc b/gcc/c-family/c-cppbuiltin.cc index 73a07055a86..b37a4c09792 100644 --- a/gcc/c-family/c-cppbuiltin.cc +++ b/gcc/c-family/c-cppbuiltin.cc @@ -1102,7 +1102,7 @@ c_cpp_builtins (cpp_reader *pfile) cpp_define (pfile, "__cpp_deleted_function=202403L"); cpp_define (pfile, "__cpp_variadic_friend=202403L"); } - if (flag_concepts) + if (flag_concepts && cxx_dialect > cxx14) cpp_define (pfile, "__cpp_concepts=202002L"); if (flag_contracts) {