public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [C++ PATCH] (temporarily) undefine __cpp_consteval
@ 2019-11-29 10:10 Jakub Jelinek
  2019-11-29 14:43 ` Marek Polacek
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Jakub Jelinek @ 2019-11-29 10:10 UTC (permalink / raw)
  To: Jason Merrill; +Cc: gcc-patches

[-- Attachment #1: Type: text/plain, Size: 2058 bytes --]

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  <jakub@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

[-- Attachment #2: cxx-status.patch --]
[-- Type: text/plain, Size: 634 bytes --]

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 &gt;= 201811 </td>
     </tr>
     <tr>

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2019-12-06 21:08 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-11-29 10:10 [C++ PATCH] (temporarily) undefine __cpp_consteval Jakub Jelinek
2019-11-29 14:43 ` Marek Polacek
2019-11-29 14:54   ` Jakub Jelinek
2019-11-29 15:03     ` Marek Polacek
2019-12-06 17:14 ` Patch ping (was Re: [C++ PATCH] (temporarily) undefine __cpp_consteval) Jakub Jelinek
2019-12-06 21:08 ` [C++ PATCH] (temporarily) undefine __cpp_consteval Jason Merrill

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).