Hi! When submitting the P1902R1 patch for missing feature macros, I completely forgot that we can't claim consteval support, because we have the /* FIXME: For now. */ if (virtualp && (inlinep & 8) != 0) { sorry_at (DECL_SOURCE_LOCATION (decl), "%<virtual%> %<consteval%> method %qD not supported yet", decl); inlinep &= ~8; } limitation in consteval support. I've tried to make some progress on it in PR88335, but am stuck, so this patch instead comments out this and updates cxx-status.html to explain the partial support.
Bootstrapped/regtested on x86_64-linux and i686-linux, ok for trunk and wwwdocs? 2019-11-29 Jakub Jelinek <ja...@redhat.com> * c-cppbuiltin.c (c_cpp_builtins): Don't define __cpp_consteval for now. * g++.dg/cpp2a/feat-cxx2a.C: Don't test __cpp_consteval for now. --- gcc/c-family/c-cppbuiltin.c.jj 2019-11-28 09:02:23.705869433 +0100 +++ gcc/c-family/c-cppbuiltin.c 2019-11-28 18:59:20.407918255 +0100 @@ -999,7 +999,7 @@ c_cpp_builtins (cpp_reader *pfile) cpp_define (pfile, "__cpp_designated_initializers=201707L"); cpp_define (pfile, "__cpp_constexpr_in_decltype=201711L"); cpp_define (pfile, "__cpp_conditional_explicit=201806L"); - cpp_define (pfile, "__cpp_consteval=201811L"); + /* cpp_define (pfile, "__cpp_consteval=201811L"); */ cpp_define (pfile, "__cpp_constinit=201907L"); cpp_define (pfile, "__cpp_deduction_guides=201907L"); cpp_define (pfile, "__cpp_nontype_template_parameter_class=201806L"); --- gcc/testsuite/g++.dg/cpp2a/feat-cxx2a.C.jj 2019-11-28 09:02:25.331844453 +0100 +++ gcc/testsuite/g++.dg/cpp2a/feat-cxx2a.C 2019-11-28 19:00:59.459400136 +0100 @@ -520,11 +520,13 @@ # error "__cpp_constexpr_in_decltype != 201711" #endif +/* Not supported fully yet: #ifndef __cpp_consteval # error "__cpp_consteval" #elif __cpp_consteval != 201811 # error "__cpp_consteval != 201811" #endif +*/ #ifndef __cpp_concepts # error "__cpp_concepts" Jakub
diff --git a/htdocs/projects/cxx-status.html b/htdocs/projects/cxx-status.html index c6ff78e1..c8655a17 100644 --- a/htdocs/projects/cxx-status.html +++ b/htdocs/projects/cxx-status.html @@ -288,7 +288,8 @@ <tr> <td> Immediate functions (consteval) </td> <td><a href="http://wg21.link/p1073r3">P1073R3</a></td> - <td class="supported"> <a href="../gcc-10/changes.html#cxx">10</a> </td> + <td class="supported"> <a href="../gcc-10/changes.html#cxx">10</a> + (partial, no <code>consteval virtual</code> support) </td> <td> __cpp_consteval >= 201811 </td> </tr> <tr>