public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug libstdc++/94702] New: std::unsequenced_policy should not be defined for C++17
@ 2020-04-21 21:02 redi at gcc dot gnu.org
2020-04-21 21:42 ` [Bug libstdc++/94702] " rodgertq at gcc dot gnu.org
` (4 more replies)
0 siblings, 5 replies; 6+ messages in thread
From: redi at gcc dot gnu.org @ 2020-04-21 21:02 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94702
Bug ID: 94702
Summary: std::unsequenced_policy should not be defined for
C++17
Product: gcc
Version: 10.0
Status: UNCONFIRMED
Keywords: rejects-valid
Severity: normal
Priority: P3
Component: libstdc++
Assignee: unassigned at gcc dot gnu.org
Reporter: redi at gcc dot gnu.org
CC: rodgertq at gcc dot gnu.org
Target Milestone: ---
This should compile without error in C++17:
// { dg-options "-std=gnu++17" }
// { dg-do compile { target c++17_only } }
#define unsequenced_policy 1
#include <execution>
It fails because std::unsequenced_policy is defined unconditionally.
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug libstdc++/94702] std::unsequenced_policy should not be defined for C++17
2020-04-21 21:02 [Bug libstdc++/94702] New: std::unsequenced_policy should not be defined for C++17 redi at gcc dot gnu.org
@ 2020-04-21 21:42 ` rodgertq at gcc dot gnu.org
2020-04-22 21:32 ` redi at gcc dot gnu.org
` (3 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: rodgertq at gcc dot gnu.org @ 2020-04-21 21:42 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94702
Thomas Rodgers <rodgertq at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |ASSIGNED
Ever confirmed|0 |1
Last reconfirmed| |2020-04-21
Assignee|unassigned at gcc dot gnu.org |rodgertq at gcc dot gnu.org
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug libstdc++/94702] std::unsequenced_policy should not be defined for C++17
2020-04-21 21:02 [Bug libstdc++/94702] New: std::unsequenced_policy should not be defined for C++17 redi at gcc dot gnu.org
2020-04-21 21:42 ` [Bug libstdc++/94702] " rodgertq at gcc dot gnu.org
@ 2020-04-22 21:32 ` redi at gcc dot gnu.org
2020-04-22 22:15 ` redi at gcc dot gnu.org
` (2 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: redi at gcc dot gnu.org @ 2020-04-22 21:32 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94702
--- Comment #1 from Jonathan Wakely <redi at gcc dot gnu.org> ---
Another bug is that we don't support the __cpp_lib_execution macro, which
should have been updated to indicate this policy is supported.
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug libstdc++/94702] std::unsequenced_policy should not be defined for C++17
2020-04-21 21:02 [Bug libstdc++/94702] New: std::unsequenced_policy should not be defined for C++17 redi at gcc dot gnu.org
2020-04-21 21:42 ` [Bug libstdc++/94702] " rodgertq at gcc dot gnu.org
2020-04-22 21:32 ` redi at gcc dot gnu.org
@ 2020-04-22 22:15 ` redi at gcc dot gnu.org
2020-04-22 22:16 ` redi at gcc dot gnu.org
2020-04-23 20:16 ` cvs-commit at gcc dot gnu.org
4 siblings, 0 replies; 6+ messages in thread
From: redi at gcc dot gnu.org @ 2020-04-22 22:15 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94702
--- Comment #2 from Jonathan Wakely <redi at gcc dot gnu.org> ---
(In reply to Jonathan Wakely from comment #1)
> Another bug is that we don't support the __cpp_lib_execution macro, which
> should have been updated to indicate this policy is supported.
That has been fixed in g:aac39307e8f589dba231083a3e9aa3d0ff302837 so that
__cpp_lib_execution is always defined to 201902L even in C++17, to reflect that
this policy is always defined. That way the feature test macro accurately
describes our implementation.
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug libstdc++/94702] std::unsequenced_policy should not be defined for C++17
2020-04-21 21:02 [Bug libstdc++/94702] New: std::unsequenced_policy should not be defined for C++17 redi at gcc dot gnu.org
` (2 preceding siblings ...)
2020-04-22 22:15 ` redi at gcc dot gnu.org
@ 2020-04-22 22:16 ` redi at gcc dot gnu.org
2020-04-23 20:16 ` cvs-commit at gcc dot gnu.org
4 siblings, 0 replies; 6+ messages in thread
From: redi at gcc dot gnu.org @ 2020-04-22 22:16 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94702
--- Comment #3 from Jonathan Wakely <redi at gcc dot gnu.org> ---
Created attachment 48358
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=48358&action=edit
Patch to set __cpp_lib_execution correctly
If/when this bug is fixed we'll want something like this patch so that
__cpp_lib_execution has a different value for C++17 and C++20.
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug libstdc++/94702] std::unsequenced_policy should not be defined for C++17
2020-04-21 21:02 [Bug libstdc++/94702] New: std::unsequenced_policy should not be defined for C++17 redi at gcc dot gnu.org
` (3 preceding siblings ...)
2020-04-22 22:16 ` redi at gcc dot gnu.org
@ 2020-04-23 20:16 ` cvs-commit at gcc dot gnu.org
4 siblings, 0 replies; 6+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2020-04-23 20:16 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94702
--- Comment #4 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-9 branch has been updated by Jonathan Wakely
<redi@gcc.gnu.org>:
https://gcc.gnu.org/g:9d13ebadf78821fe5a239600460a81c10def10cc
commit r9-8536-g9d13ebadf78821fe5a239600460a81c10def10cc
Author: Jonathan Wakely <jwakely@redhat.com>
Date: Thu Apr 23 18:48:50 2020 +0100
libstdc++: Define __cpp_lib_execution feature test
This macro has never been defined by libstdc++, despite supporting the
parallel algorithms. It should have a different value for C++17 and
C++20, because P1001R2 should not be supported in C++17, but
unsequenced_policy is defined for C++17 (see PR 94702).
Backport from mainline
2020-04-22 Jonathan Wakely <jwakely@redhat.com>
* include/std/execution (__cpp_lib_execution): Define to indicate
support for P0024R2 and P1001R2.
* include/std/version (__cpp_lib_execution): Define.
* testsuite/25_algorithms/pstl/feature_test.cc: Only test macro
defined by <algorithm>, move other tests to new tests ...
* testsuite/25_algorithms/pstl/feature_test-2.cc: New test.
* testsuite/25_algorithms/pstl/feature_test-3.cc: New test.
* testsuite/25_algorithms/pstl/feature_test-4.cc: New test.
* testsuite/25_algorithms/pstl/feature_test-5.cc: New test.
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2020-04-23 20:16 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-04-21 21:02 [Bug libstdc++/94702] New: std::unsequenced_policy should not be defined for C++17 redi at gcc dot gnu.org
2020-04-21 21:42 ` [Bug libstdc++/94702] " rodgertq at gcc dot gnu.org
2020-04-22 21:32 ` redi at gcc dot gnu.org
2020-04-22 22:15 ` redi at gcc dot gnu.org
2020-04-22 22:16 ` redi at gcc dot gnu.org
2020-04-23 20:16 ` cvs-commit at gcc dot gnu.org
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).