aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorJason Merrill <jason@redhat.com>2024-10-01 10:58:35 -0400
committerJason Merrill <jason@redhat.com>2024-10-01 17:40:49 -0400
commit1c9b440bf6768c1053101c4a473f5fc9757f52a5 (patch)
tree7383d340e3ac6497d029e0fe49cba3a0205a4bb1 /gcc
parentf72b1a44ff582041b02d5abe0a6c8556057e6183 (diff)
downloadgcc-1c9b440bf6768c1053101c4a473f5fc9757f52a5.zip
gcc-1c9b440bf6768c1053101c4a473f5fc9757f52a5.tar.gz
gcc-1c9b440bf6768c1053101c4a473f5fc9757f52a5.tar.bz2
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.
Diffstat (limited to 'gcc')
-rw-r--r--gcc/c-family/c-cppbuiltin.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/gcc/c-family/c-cppbuiltin.cc b/gcc/c-family/c-cppbuiltin.cc
index 73a0705..b37a4c0 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)
{