]> git.ipfire.org Git - thirdparty/gcc.git/blobdiff - libstdc++-v3/testsuite/30_threads/shared_lock/locking/4.cc
Update copyright years.
[thirdparty/gcc.git] / libstdc++-v3 / testsuite / 30_threads / shared_lock / locking / 4.cc
index 9cb53b5f261a7c73f3a358ca973c5ba7fbeac43d..8f049c4fc00889b0bf225b47b47d716b2a4715bb 100644 (file)
@@ -1,11 +1,9 @@
-// { dg-do run { target *-*-freebsd* *-*-dragonfly* *-*-dragonfly* *-*-netbsd* *-*-linux* *-*-solaris* *-*-cygwin *-*-darwin* powerpc-ibm-aix* } }
-// { dg-options " -std=gnu++1y -pthread" { target *-*-freebsd* *-*-dragonfly* *-*-dragonfly* *-*-netbsd* *-*-linux* powerpc-ibm-aix* } }
-// { dg-options " -std=gnu++1y -pthreads" { target *-*-solaris* } }
-// { dg-options " -std=gnu++1y " { target *-*-cygwin *-*-darwin* } }
-// { dg-require-cstdint "" }
-// { dg-require-gthreads-timed "" }
+// { dg-do run }
+// { dg-additional-options "-pthread" { target pthread } }
+// { dg-require-effective-target c++14 }
+// { dg-require-gthreads "" }
 
-// Copyright (C) 2013-2014 Free Software Foundation, Inc.
+// Copyright (C) 2013-2024 Free Software Foundation, Inc.
 //
 // This file is part of the GNU ISO C++ Library.  This library is free
 // software; you can redistribute it and/or modify it under the
@@ -30,7 +28,6 @@
 
 int main()
 {
-  bool test __attribute__((unused)) = true;
   typedef std::shared_timed_mutex mutex_type;
   typedef std::shared_lock<mutex_type> lock_type;
   typedef std::chrono::system_clock clock_type;
@@ -43,7 +40,7 @@ int main()
 
       try
        {
-         l.try_lock_until(t);
+         (void) l.try_lock_until(t);
        }
       catch(const std::system_error&)
        {