* [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 >= 201811 </td>
</tr>
<tr>
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [C++ PATCH] (temporarily) undefine __cpp_consteval
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-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
2 siblings, 1 reply; 6+ messages in thread
From: Marek Polacek @ 2019-11-29 14:43 UTC (permalink / raw)
To: Jakub Jelinek; +Cc: Jason Merrill, gcc-patches
On Fri, Nov 29, 2019 at 10:30:13AM +0100, Jakub Jelinek wrote:
> --- 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>
You can use class="partial" which I added for use in the DR table.
--
Marek Polacek • Red Hat, Inc. • 300 A St, Boston, MA
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [C++ PATCH] (temporarily) undefine __cpp_consteval
2019-11-29 14:43 ` Marek Polacek
@ 2019-11-29 14:54 ` Jakub Jelinek
2019-11-29 15:03 ` Marek Polacek
0 siblings, 1 reply; 6+ messages in thread
From: Jakub Jelinek @ 2019-11-29 14:54 UTC (permalink / raw)
To: Marek Polacek; +Cc: Jason Merrill, gcc-patches
On Fri, Nov 29, 2019 at 09:42:06AM -0500, Marek Polacek wrote:
> On Fri, Nov 29, 2019 at 10:30:13AM +0100, Jakub Jelinek wrote:
> > --- 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>
>
> You can use class="partial" which I added for use in the DR table.
We have other partial ones (__VA_OPT__), so then:
diff --git a/htdocs/projects/cxx-status.html b/htdocs/projects/cxx-status.html
index c6ff78e1..00ca61e4 100644
--- a/htdocs/projects/cxx-status.html
+++ b/htdocs/projects/cxx-status.html
@@ -87,7 +87,7 @@
<td> <code>__VA_OPT__</code> for preprocessor comma elision </td>
<td><a href="http://wg21.link/p0306r4">P0306R4</a><br/>
<a href="http://wg21.link/p1042r1">P1042R1</a></td>
- <td class="supported"> <a href="../gcc-8/changes.html#cxx">8</a>
+ <td class="partial"> <a href="../gcc-8/changes.html#cxx">8</a>
(partial, no <code>#__VA_OPT__</code> support) </td>
<td> </td>
</tr>
@@ -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="partial"> <a href="../gcc-10/changes.html#cxx">10</a>
+ (partial, no <code>consteval virtual</code> support) </td>
<td> __cpp_consteval >= 201811 </td>
</tr>
<tr>
Jakub
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [C++ PATCH] (temporarily) undefine __cpp_consteval
2019-11-29 14:54 ` Jakub Jelinek
@ 2019-11-29 15:03 ` Marek Polacek
0 siblings, 0 replies; 6+ messages in thread
From: Marek Polacek @ 2019-11-29 15:03 UTC (permalink / raw)
To: Jakub Jelinek; +Cc: Jason Merrill, gcc-patches
On Fri, Nov 29, 2019 at 03:49:37PM +0100, Jakub Jelinek wrote:
> On Fri, Nov 29, 2019 at 09:42:06AM -0500, Marek Polacek wrote:
> > On Fri, Nov 29, 2019 at 10:30:13AM +0100, Jakub Jelinek wrote:
> > > --- 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>
> >
> > You can use class="partial" which I added for use in the DR table.
>
> We have other partial ones (__VA_OPT__), so then:
>
> diff --git a/htdocs/projects/cxx-status.html b/htdocs/projects/cxx-status.html
> index c6ff78e1..00ca61e4 100644
> --- a/htdocs/projects/cxx-status.html
> +++ b/htdocs/projects/cxx-status.html
> @@ -87,7 +87,7 @@
> <td> <code>__VA_OPT__</code> for preprocessor comma elision </td>
> <td><a href="http://wg21.link/p0306r4">P0306R4</a><br/>
> <a href="http://wg21.link/p1042r1">P1042R1</a></td>
> - <td class="supported"> <a href="../gcc-8/changes.html#cxx">8</a>
> + <td class="partial"> <a href="../gcc-8/changes.html#cxx">8</a>
> (partial, no <code>#__VA_OPT__</code> support) </td>
> <td> </td>
> </tr>
> @@ -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="partial"> <a href="../gcc-10/changes.html#cxx">10</a>
> + (partial, no <code>consteval virtual</code> support) </td>
> <td> __cpp_consteval >= 201811 </td>
> </tr>
> <tr>
Sure, this is fine.
Marek
^ permalink raw reply [flat|nested] 6+ messages in thread
* Patch ping (was Re: [C++ PATCH] (temporarily) undefine __cpp_consteval)
2019-11-29 10:10 [C++ PATCH] (temporarily) undefine __cpp_consteval Jakub Jelinek
2019-11-29 14:43 ` Marek Polacek
@ 2019-12-06 17:14 ` Jakub Jelinek
2019-12-06 21:08 ` [C++ PATCH] (temporarily) undefine __cpp_consteval Jason Merrill
2 siblings, 0 replies; 6+ messages in thread
From: Jakub Jelinek @ 2019-12-06 17:14 UTC (permalink / raw)
To: Jason Merrill; +Cc: gcc-patches
On Fri, Nov 29, 2019 at 10:30:13AM +0100, Jakub Jelinek wrote:
> 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.
I'd like to ping this patch (the wwwdocs change has been committed already).
Thanks.
> --- 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
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [C++ PATCH] (temporarily) undefine __cpp_consteval
2019-11-29 10:10 [C++ PATCH] (temporarily) undefine __cpp_consteval Jakub Jelinek
2019-11-29 14:43 ` Marek Polacek
2019-12-06 17:14 ` Patch ping (was Re: [C++ PATCH] (temporarily) undefine __cpp_consteval) Jakub Jelinek
@ 2019-12-06 21:08 ` Jason Merrill
2 siblings, 0 replies; 6+ messages in thread
From: Jason Merrill @ 2019-12-06 21:08 UTC (permalink / raw)
To: Jakub Jelinek; +Cc: gcc-patches
On 11/29/19 4:30 AM, Jakub Jelinek wrote:
> 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?
OK.
> 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
>
^ 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).