On 16/10/18 16:24 +0100, Jonathan Wakely wrote:
On 12/10/18 11:50 +0100, Jonathan Wakely wrote:
This implementation is very incomplete (see the various TODO comments
in the code) but rather than keeping it out of tree any longer I'm
committing it to trunk. This will allow others to experiment with it
and (I hope) work on finishing it. Either way we'll ship somehing for
gcc 9. It works OK for some synchronous operations, but most of the
async ops are not done yet.
* include/Makefile.am: Add new headers.
* include/Makefile.in: Regenerate.
* include/experimental/bits/net.h: New header for common
implementation details of Networking TS.
* include/experimental/buffer: New header.
* include/experimental/executor: New header.
* include/experimental/internet: New header.
* include/experimental/io_context: New header.
* include/experimental/net: New header.
* include/experimental/netfwd: New header.
* include/experimental/socket: New header.
* include/experimental/timer: New header.
* testsuite/experimental/net/buffer/arithmetic.cc: New test.
* testsuite/experimental/net/buffer/const.cc: New test.
* testsuite/experimental/net/buffer/creation.cc: New test.
* testsuite/experimental/net/buffer/mutable.cc: New test.
* testsuite/experimental/net/buffer/size.cc: New test.
* testsuite/experimental/net/buffer/traits.cc: New test.
* testsuite/experimental/net/execution_context/use_service.cc: New
test.
* testsuite/experimental/net/headers.cc: New test.
* testsuite/experimental/net/internet/address/v4/comparisons.cc: New
test.
* testsuite/experimental/net/internet/address/v4/cons.cc: New test.
* testsuite/experimental/net/internet/address/v4/creation.cc: New
test.
* testsuite/experimental/net/internet/address/v4/members.cc: New
test.
* testsuite/experimental/net/internet/resolver/base.cc: New test.
* testsuite/experimental/net/internet/resolver/ops/lookup.cc: New
test.
* testsuite/experimental/net/internet/resolver/ops/reverse.cc: New
test.
* testsuite/experimental/net/timer/waitable/cons.cc: New test.
* testsuite/experimental/net/timer/waitable/dest.cc: New test.
* testsuite/experimental/net/timer/waitable/ops.cc: New test.
A minor correction. Committed to trunk.
The tests were written three years ago, before we used effective
targets to control the C++14 dialect used for tests. This fixes them
to use the modern style.
Tested x86_64-linux, committed to trunk.
commit 9abc5d5ee09b86cd1e433de5b41160afe0a7d8a6
Author: Jonathan Wakely <jwak...@redhat.com>
Date: Tue Oct 16 16:29:21 2018 +0100
Use effective target in Networking TS tests
* testsuite/experimental/net/headers.cc: Remove dg-options.
* testsuite/experimental/net/buffer/arithmetic.cc: Replace dg-options
with dg-do using effective target.
* testsuite/experimental/net/buffer/const.cc: Likewise.
* testsuite/experimental/net/buffer/creation.cc: Likewise.
* testsuite/experimental/net/buffer/mutable.cc: Likewise.
* testsuite/experimental/net/buffer/size.cc: Likewise.
* testsuite/experimental/net/buffer/traits.cc: Likewise.
* testsuite/experimental/net/execution_context/use_service.cc:
Likewise.
* testsuite/experimental/net/internet/address/v4/comparisons.cc:
Likewise.
* testsuite/experimental/net/internet/address/v4/cons.cc: Likewise.
* testsuite/experimental/net/internet/address/v4/creation.cc:
Likewise.
* testsuite/experimental/net/internet/address/v4/members.cc: Likewise.
* testsuite/experimental/net/internet/resolver/base.cc: Likewise.
* testsuite/experimental/net/internet/resolver/ops/lookup.cc:
Likewise.
* testsuite/experimental/net/internet/resolver/ops/reverse.cc:
Likewise.
* testsuite/experimental/net/timer/waitable/cons.cc: Likewise.
* testsuite/experimental/net/timer/waitable/dest.cc: Likewise.
* testsuite/experimental/net/timer/waitable/ops.cc: Likewise.
diff --git a/libstdc++-v3/testsuite/experimental/net/buffer/arithmetic.cc b/libstdc++-v3/testsuite/experimental/net/buffer/arithmetic.cc
index 7a894a90530..861afa83e46 100644
--- a/libstdc++-v3/testsuite/experimental/net/buffer/arithmetic.cc
+++ b/libstdc++-v3/testsuite/experimental/net/buffer/arithmetic.cc
@@ -15,7 +15,7 @@
// with this library; see the file COPYING3. If not see
// <http://www.gnu.org/licenses/>.
-// { dg-options "-std=gnu++14" }
+// { dg-do run { target c++14 } }
#include <experimental/buffer>
#include <testsuite_hooks.h>
diff --git a/libstdc++-v3/testsuite/experimental/net/buffer/const.cc b/libstdc++-v3/testsuite/experimental/net/buffer/const.cc
index d61f05dc897..3b207f7717a 100644
--- a/libstdc++-v3/testsuite/experimental/net/buffer/const.cc
+++ b/libstdc++-v3/testsuite/experimental/net/buffer/const.cc
@@ -15,7 +15,7 @@
// with this library; see the file COPYING3. If not see
// <http://www.gnu.org/licenses/>.
-// { dg-options "-std=gnu++14" }
+// { dg-do run { target c++14 } }
#include <experimental/buffer>
#include <testsuite_hooks.h>
diff --git a/libstdc++-v3/testsuite/experimental/net/buffer/creation.cc b/libstdc++-v3/testsuite/experimental/net/buffer/creation.cc
index c89d79dbde2..59b126352af 100644
--- a/libstdc++-v3/testsuite/experimental/net/buffer/creation.cc
+++ b/libstdc++-v3/testsuite/experimental/net/buffer/creation.cc
@@ -15,7 +15,7 @@
// with this library; see the file COPYING3. If not see
// <http://www.gnu.org/licenses/>.
-// { dg-options "-std=gnu++14" }
+// { dg-do run { target c++14 } }
#include <experimental/buffer>
#include <testsuite_hooks.h>
diff --git a/libstdc++-v3/testsuite/experimental/net/buffer/mutable.cc b/libstdc++-v3/testsuite/experimental/net/buffer/mutable.cc
index cbcae6fc686..f35213c0f14 100644
--- a/libstdc++-v3/testsuite/experimental/net/buffer/mutable.cc
+++ b/libstdc++-v3/testsuite/experimental/net/buffer/mutable.cc
@@ -15,7 +15,7 @@
// with this library; see the file COPYING3. If not see
// <http://www.gnu.org/licenses/>.
-// { dg-options "-std=gnu++14" }
+// { dg-do run { target c++14 } }
#include <experimental/buffer>
#include <testsuite_hooks.h>
diff --git a/libstdc++-v3/testsuite/experimental/net/buffer/size.cc b/libstdc++-v3/testsuite/experimental/net/buffer/size.cc
index 74fc49eca77..7560a6991a4 100644
--- a/libstdc++-v3/testsuite/experimental/net/buffer/size.cc
+++ b/libstdc++-v3/testsuite/experimental/net/buffer/size.cc
@@ -15,7 +15,7 @@
// with this library; see the file COPYING3. If not see
// <http://www.gnu.org/licenses/>.
-// { dg-options "-std=gnu++14" }
+// { dg-do run { target c++14 } }
#include <experimental/buffer>
#include <testsuite_hooks.h>
diff --git a/libstdc++-v3/testsuite/experimental/net/buffer/traits.cc b/libstdc++-v3/testsuite/experimental/net/buffer/traits.cc
index fb19337f041..c01c82ac156 100644
--- a/libstdc++-v3/testsuite/experimental/net/buffer/traits.cc
+++ b/libstdc++-v3/testsuite/experimental/net/buffer/traits.cc
@@ -15,8 +15,7 @@
// with this library; see the file COPYING3. If not see
// <http://www.gnu.org/licenses/>.
-// { dg-options "-std=gnu++14" }
-// { dg-do compile }
+// { dg-do compile { target c++14 } }
#include <experimental/buffer>
diff --git a/libstdc++-v3/testsuite/experimental/net/execution_context/use_service.cc b/libstdc++-v3/testsuite/experimental/net/execution_context/use_service.cc
index d8fb6404b3c..df463b7c229 100644
--- a/libstdc++-v3/testsuite/experimental/net/execution_context/use_service.cc
+++ b/libstdc++-v3/testsuite/experimental/net/execution_context/use_service.cc
@@ -15,7 +15,7 @@
// with this library; see the file COPYING3. If not see
// <http://www.gnu.org/licenses/>.
-// { dg-options "-std=gnu++14" }
+// { dg-do run { target c++14 } }
#include <experimental/executor>
#include <testsuite_hooks.h>
diff --git a/libstdc++-v3/testsuite/experimental/net/headers.cc b/libstdc++-v3/testsuite/experimental/net/headers.cc
index 58ba13f4744..014d2f914c2 100644
--- a/libstdc++-v3/testsuite/experimental/net/headers.cc
+++ b/libstdc++-v3/testsuite/experimental/net/headers.cc
@@ -15,7 +15,6 @@
// with this library; see the file COPYING3. If not see
// <http://www.gnu.org/licenses/>.
-// { dg-options "-std=gnu++14" }
// { dg-do compile }
#include <experimental/net>
diff --git a/libstdc++-v3/testsuite/experimental/net/internet/address/v4/comparisons.cc b/libstdc++-v3/testsuite/experimental/net/internet/address/v4/comparisons.cc
index 8046e97071d..711bf7e9e2d 100644
--- a/libstdc++-v3/testsuite/experimental/net/internet/address/v4/comparisons.cc
+++ b/libstdc++-v3/testsuite/experimental/net/internet/address/v4/comparisons.cc
@@ -15,7 +15,7 @@
// with this library; see the file COPYING3. If not see
// <http://www.gnu.org/licenses/>.
-// { dg-options "-std=gnu++14" }
+// { dg-do run { target c++14 } }
// { dg-add-options net_ts }
#include <experimental/internet>
diff --git a/libstdc++-v3/testsuite/experimental/net/internet/address/v4/cons.cc b/libstdc++-v3/testsuite/experimental/net/internet/address/v4/cons.cc
index 27c208d51cb..df9fd61ca6c 100644
--- a/libstdc++-v3/testsuite/experimental/net/internet/address/v4/cons.cc
+++ b/libstdc++-v3/testsuite/experimental/net/internet/address/v4/cons.cc
@@ -15,7 +15,7 @@
// with this library; see the file COPYING3. If not see
// <http://www.gnu.org/licenses/>.
-// { dg-options "-std=gnu++14" }
+// { dg-do run { target c++14 } }
// { dg-add-options net_ts }
#include <experimental/internet>
diff --git a/libstdc++-v3/testsuite/experimental/net/internet/address/v4/creation.cc b/libstdc++-v3/testsuite/experimental/net/internet/address/v4/creation.cc
index 5d139dd5659..bf92b213fc8 100644
--- a/libstdc++-v3/testsuite/experimental/net/internet/address/v4/creation.cc
+++ b/libstdc++-v3/testsuite/experimental/net/internet/address/v4/creation.cc
@@ -15,7 +15,7 @@
// with this library; see the file COPYING3. If not see
// <http://www.gnu.org/licenses/>.
-// { dg-options "-std=gnu++14" }
+// { dg-do run { target c++14 } }
// { dg-add-options net_ts }
#include <experimental/internet>
diff --git a/libstdc++-v3/testsuite/experimental/net/internet/address/v4/members.cc b/libstdc++-v3/testsuite/experimental/net/internet/address/v4/members.cc
index 2036a586671..4c40e0cf84b 100644
--- a/libstdc++-v3/testsuite/experimental/net/internet/address/v4/members.cc
+++ b/libstdc++-v3/testsuite/experimental/net/internet/address/v4/members.cc
@@ -15,7 +15,7 @@
// with this library; see the file COPYING3. If not see
// <http://www.gnu.org/licenses/>.
-// { dg-options "-std=gnu++14" }
+// { dg-do run { target c++14 } }
// { dg-add-options net_ts }
#include <experimental/internet>
diff --git a/libstdc++-v3/testsuite/experimental/net/internet/resolver/base.cc b/libstdc++-v3/testsuite/experimental/net/internet/resolver/base.cc
index e67c476ca9d..9a41703810a 100644
--- a/libstdc++-v3/testsuite/experimental/net/internet/resolver/base.cc
+++ b/libstdc++-v3/testsuite/experimental/net/internet/resolver/base.cc
@@ -15,7 +15,7 @@
// with this library; see the file COPYING3. If not see
// <http://www.gnu.org/licenses/>.
-// { dg-options "-std=gnu++14" }
+// { dg-do run { target c++14 } }
// { dg-add-options net_ts }
#include <experimental/internet>
diff --git a/libstdc++-v3/testsuite/experimental/net/internet/resolver/ops/lookup.cc b/libstdc++-v3/testsuite/experimental/net/internet/resolver/ops/lookup.cc
index d8560758c55..92d6d159912 100644
--- a/libstdc++-v3/testsuite/experimental/net/internet/resolver/ops/lookup.cc
+++ b/libstdc++-v3/testsuite/experimental/net/internet/resolver/ops/lookup.cc
@@ -15,7 +15,7 @@
// with this library; see the file COPYING3. If not see
// <http://www.gnu.org/licenses/>.
-// { dg-options "-std=gnu++14" }
+// { dg-do run { target c++14 } }
// { dg-add-options net_ts }
#include <experimental/internet>
diff --git a/libstdc++-v3/testsuite/experimental/net/internet/resolver/ops/reverse.cc b/libstdc++-v3/testsuite/experimental/net/internet/resolver/ops/reverse.cc
index 6b58f584b8c..a71fc71c172 100644
--- a/libstdc++-v3/testsuite/experimental/net/internet/resolver/ops/reverse.cc
+++ b/libstdc++-v3/testsuite/experimental/net/internet/resolver/ops/reverse.cc
@@ -15,7 +15,7 @@
// with this library; see the file COPYING3. If not see
// <http://www.gnu.org/licenses/>.
-// { dg-options "-std=gnu++14" }
+// { dg-do run { target c++14 } }
// { dg-add-options net_ts }
#include <experimental/internet>
diff --git a/libstdc++-v3/testsuite/experimental/net/timer/waitable/cons.cc b/libstdc++-v3/testsuite/experimental/net/timer/waitable/cons.cc
index 3bce0576e12..51e5c2cd611 100644
--- a/libstdc++-v3/testsuite/experimental/net/timer/waitable/cons.cc
+++ b/libstdc++-v3/testsuite/experimental/net/timer/waitable/cons.cc
@@ -15,7 +15,7 @@
// with this library; see the file COPYING3. If not see
// <http://www.gnu.org/licenses/>.
-// { dg-options "-std=gnu++14" }
+// { dg-do run { target c++14 } }
#include <experimental/timer>
#include <testsuite_hooks.h>
diff --git a/libstdc++-v3/testsuite/experimental/net/timer/waitable/dest.cc b/libstdc++-v3/testsuite/experimental/net/timer/waitable/dest.cc
index 743f28a55e9..173215c9808 100644
--- a/libstdc++-v3/testsuite/experimental/net/timer/waitable/dest.cc
+++ b/libstdc++-v3/testsuite/experimental/net/timer/waitable/dest.cc
@@ -15,7 +15,7 @@
// with this library; see the file COPYING3. If not see
// <http://www.gnu.org/licenses/>.
-// { dg-options "-std=gnu++14" }
+// { dg-do run { target c++14 } }
#include <experimental/timer>
#include <testsuite_hooks.h>
diff --git a/libstdc++-v3/testsuite/experimental/net/timer/waitable/ops.cc b/libstdc++-v3/testsuite/experimental/net/timer/waitable/ops.cc
index c4e0b1bfe41..bf5f1e4c08e 100644
--- a/libstdc++-v3/testsuite/experimental/net/timer/waitable/ops.cc
+++ b/libstdc++-v3/testsuite/experimental/net/timer/waitable/ops.cc
@@ -15,7 +15,7 @@
// with this library; see the file COPYING3. If not see
// <http://www.gnu.org/licenses/>.
-// { dg-options "-std=gnu++14" }
+// { dg-do run { target c++14 } }
#include <experimental/timer>
#include <testsuite_hooks.h>