Move dg-error directives to relevant lines
authorJonathan Wakely <jwakely@redhat.com>
Sun, 31 Jul 2016 16:51:08 +0000 (17:51 +0100)
committerJonathan Wakely <redi@gcc.gnu.org>
Sun, 31 Jul 2016 16:51:08 +0000 (17:51 +0100)
* testsuite/20_util/duration/requirements/typedefs_neg3.cc: Move
dg-error to relevant line.
* testsuite/20_util/headers/type_traits/types_std_c++0x_neg.cc:
Likewise.
* testsuite/23_containers/forward_list/requirements/dr438/
assign_neg.cc: Likewise.
* testsuite/23_containers/forward_list/requirements/dr438/
constructor_1_neg.cc: Likewise.
* testsuite/23_containers/forward_list/requirements/dr438/
constructor_2_neg.cc: Likewise.
* testsuite/23_containers/forward_list/requirements/dr438/
insert_neg.cc: Likewise.
* testsuite/26_numerics/headers/cmath/types_std_c++0x_neg.cc:
Likewise.
* testsuite/26_numerics/random/linear_congruential_engine/
requirements/non_uint_neg.cc: Likewise.
* testsuite/29_atomics/headers/atomic/types_std_c++0x_neg.cc:
Likewise. Also test for std::atomic_address.

From-SVN: r238923

libstdc++-v3/ChangeLog
libstdc++-v3/testsuite/20_util/duration/requirements/typedefs_neg3.cc
libstdc++-v3/testsuite/20_util/headers/type_traits/types_std_c++0x_neg.cc
libstdc++-v3/testsuite/23_containers/forward_list/requirements/dr438/assign_neg.cc
libstdc++-v3/testsuite/23_containers/forward_list/requirements/dr438/constructor_1_neg.cc
libstdc++-v3/testsuite/23_containers/forward_list/requirements/dr438/constructor_2_neg.cc
libstdc++-v3/testsuite/23_containers/forward_list/requirements/dr438/insert_neg.cc
libstdc++-v3/testsuite/26_numerics/headers/cmath/types_std_c++0x_neg.cc
libstdc++-v3/testsuite/26_numerics/random/linear_congruential_engine/requirements/non_uint_neg.cc
libstdc++-v3/testsuite/29_atomics/headers/atomic/types_std_c++0x_neg.cc

index 693aeee66c3f2464f3a80eed1c46848e61bc0868..a50066eef111ace32a1d3f7f6698e62946462b67 100644 (file)
@@ -1,3 +1,24 @@
+2016-07-31  Jonathan Wakely  <jwakely@redhat.com>
+
+       * testsuite/20_util/duration/requirements/typedefs_neg3.cc: Move
+       dg-error to relevant line.
+       * testsuite/20_util/headers/type_traits/types_std_c++0x_neg.cc:
+       Likewise.
+       * testsuite/23_containers/forward_list/requirements/dr438/
+       assign_neg.cc: Likewise.
+       * testsuite/23_containers/forward_list/requirements/dr438/
+       constructor_1_neg.cc: Likewise.
+       * testsuite/23_containers/forward_list/requirements/dr438/
+       constructor_2_neg.cc: Likewise.
+       * testsuite/23_containers/forward_list/requirements/dr438/
+       insert_neg.cc: Likewise.
+       * testsuite/26_numerics/headers/cmath/types_std_c++0x_neg.cc:
+       Likewise.
+       * testsuite/26_numerics/random/linear_congruential_engine/
+       requirements/non_uint_neg.cc: Likewise.
+       * testsuite/29_atomics/headers/atomic/types_std_c++0x_neg.cc:
+       Likewise. Also test for std::atomic_address.
+
 2016-07-31  Ville Voutilainen  <ville.voutilainen@gmail.com>
 
        Add missing variable traits, fix testsuite failures.
index 2369440b3d50d0748395deda652180b0ed63f730..7fb022b62219b55eda5c2237d2b72c7fc3b9d193 100644 (file)
@@ -30,8 +30,7 @@ void test01()
   typedef int rep_type;
   typedef std::ratio<-1> period_type;
   typedef std::chrono::duration<rep_type, period_type> test_type;
-  test_type d;
+  test_type d;  // { dg-error "required from here" }
 }
 
 // { dg-error "period must be positive" "" { target *-*-* } 253 }
-// { dg-error "required from here" "" { target *-*-* } 33 }
index 0696fad436d8320ae27fc3526a130c9eb63034cd..fc9fbe531e01129fa2bcfd99407748dcbd8ceee6 100644 (file)
 
 namespace gnu
 {
-  // C++0x changes from TR1.
-  using std::has_trivial_constructor;
-  using std::has_nothrow_constructor;
-  using std::has_trivial_copy;
-  using std::has_nothrow_copy;
+  // C++11 changes from TR1.
+  using std::has_trivial_constructor; // { dg-error "has not been declared" }
+  using std::has_nothrow_constructor; // { dg-error "has not been declared" }
+  using std::has_trivial_copy;       // { dg-error "has not been declared" }
+  using std::has_nothrow_copy;       // { dg-error "has not been declared" }
 }
-
-// { dg-error "has not been declared" "" { target *-*-* } 26 } 
-// { dg-error "has not been declared" "" { target *-*-* } 27 } 
-// { dg-error "has not been declared" "" { target *-*-* } 28 } 
-// { dg-error "has not been declared" "" { target *-*-* } 29 } 
-
index 5f29e8ec3c16123aedf6db7e82f9587b558d9f81..1fa2106b4821d4339fc2bbde4a1732a9ed408b70 100644 (file)
@@ -1,6 +1,5 @@
 // { dg-do compile }
 // { dg-options "-std=gnu++11" }
-// { dg-error "no matching" "" { target *-*-* } 33 }
 
 // Copyright (C) 2009-2016 Free Software Foundation, Inc.
 //
@@ -30,5 +29,5 @@ void f()
 {
   typedef std::forward_list<A> test_type;
   test_type l;
-  l.assign(10, 1);
+  l.assign(10, 1); // { dg-error "no matching" }
 }
index 15aeac7ac7f01b0cbc38d5df9258165b06848dc5..829c84d5a053497bca14321896d547730a905775 100644 (file)
@@ -1,6 +1,5 @@
 // { dg-do compile }
 // { dg-options "-std=gnu++11" }
-// { dg-error "no matching" "" { target *-*-* } 27 }
 
 // Copyright (C) 2009-2016 Free Software Foundation, Inc.
 //
@@ -24,5 +23,5 @@
 void f()
 {
   typedef std::forward_list<std::forward_list<int> > test_type;
-  test_type l(10, 1);
+  test_type l(10, 1); // { dg-error "no matching" }
 }
index 9a330a3af1dfcdf56e9480891ebc004fa37b5635..2ebcec3002dc42a75cefc581b6e96b18da3268d5 100644 (file)
@@ -1,6 +1,5 @@
 // { dg-do compile }
 // { dg-options "-std=gnu++11" }
-// { dg-error "no matching" "" { target *-*-* } 28 }
 
 // Copyright (C) 2009-2016 Free Software Foundation, Inc.
 //
@@ -25,5 +24,5 @@
 void f()
 {
   typedef std::forward_list<std::forward_list<std::pair<char, char> > > test_type;
-  test_type l('a', 'b');
+  test_type l('a', 'b'); // { dg-error "no matching" }
 }
index 783feb8fb066f2fd4d8372ecfaea01c689494ebf..cc2f2af0f96f1b20104d02b567b995456678faaa 100644 (file)
@@ -1,6 +1,5 @@
 // { dg-do compile }
 // { dg-options "-std=gnu++11" }
-// { dg-error "no matching" "" { target *-*-* } 33 }
 
 // Copyright (C) 2009-2016 Free Software Foundation, Inc.
 //
@@ -30,5 +29,5 @@ void f()
 {
   typedef std::forward_list<A> test_type;
   test_type l;
-  l.insert_after(l.begin(), 10, 1);
+  l.insert_after(l.begin(), 10, 1); // { dg-error "no matching" }
 }
index 268832bd179d34515adb47d3df24492c81b164cf..8910c7e9a906637418fb07744004aa2af14c9964 100644 (file)
 
 namespace gnu
 {
-  // C++0x changes from TR1.
-  using std::assoc_laguerre;
-  using std::assoc_legendre;
-  using std::beta; 
-  using std::comp_ellint_1;
-  using std::comp_ellint_2;
-  using std::comp_ellint_3;
-  using std::conf_hyperg;
-  using std::cyl_bessel_i;
-  using std::cyl_bessel_j;
-  using std::cyl_bessel_k;
-  using std::cyl_neumann;
-  using std::ellint_1;
-  using std::ellint_2;
-  using std::ellint_3;
-  using std::expint;  
-  using std::hermite;
-  using std::hyperg;
-  using std::laguerre;
-  using std::legendre;
-  using std::riemann_zeta;
-  using std::sph_bessel;
-  using std::sph_legendre;
-  using std::sph_neumann;
+  // C++11 changes from TR1.
+  using std::assoc_laguerre;   // { dg-error "has not been declared" }
+  using std::assoc_legendre;   // { dg-error "has not been declared" }
+  using std::beta;             // { dg-error "has not been declared" }
+  using std::comp_ellint_1;    // { dg-error "has not been declared" }
+  using std::comp_ellint_2;    // { dg-error "has not been declared" }
+  using std::comp_ellint_3;    // { dg-error "has not been declared" }
+  using std::conf_hyperg;      // { dg-error "has not been declared" }
+  using std::cyl_bessel_i;     // { dg-error "has not been declared" }
+  using std::cyl_bessel_j;     // { dg-error "has not been declared" }
+  using std::cyl_bessel_k;     // { dg-error "has not been declared" }
+  using std::cyl_neumann;      // { dg-error "has not been declared" }
+  using std::ellint_1;         // { dg-error "has not been declared" }
+  using std::ellint_2;         // { dg-error "has not been declared" }
+  using std::ellint_3;         // { dg-error "has not been declared" }
+  using std::expint;           // { dg-error "has not been declared" }
+  using std::hermite;          // { dg-error "has not been declared" }
+  using std::hyperg;           // { dg-error "has not been declared" }
+  using std::laguerre;         // { dg-error "has not been declared" }
+  using std::legendre;         // { dg-error "has not been declared" }
+  using std::riemann_zeta;     // { dg-error "has not been declared" }
+  using std::sph_bessel;       // { dg-error "has not been declared" }
+  using std::sph_legendre;     // { dg-error "has not been declared" }
+  using std::sph_neumann;      // { dg-error "has not been declared" }
 }
-
-// { dg-error "has not been declared" "" { target *-*-* } 26 } 
-// { dg-error "has not been declared" "" { target *-*-* } 27 } 
-// { dg-error "has not been declared" "" { target *-*-* } 28 } 
-// { dg-error "has not been declared" "" { target *-*-* } 29 } 
-// { dg-error "has not been declared" "" { target *-*-* } 30 } 
-// { dg-error "has not been declared" "" { target *-*-* } 31 } 
-// { dg-error "has not been declared" "" { target *-*-* } 32 } 
-// { dg-error "has not been declared" "" { target *-*-* } 33 } 
-// { dg-error "has not been declared" "" { target *-*-* } 34 } 
-// { dg-error "has not been declared" "" { target *-*-* } 35 } 
-// { dg-error "has not been declared" "" { target *-*-* } 36 } 
-// { dg-error "has not been declared" "" { target *-*-* } 37 } 
-// { dg-error "has not been declared" "" { target *-*-* } 38 } 
-// { dg-error "has not been declared" "" { target *-*-* } 39 } 
-// { dg-error "has not been declared" "" { target *-*-* } 40 } 
-// { dg-error "has not been declared" "" { target *-*-* } 41 } 
-// { dg-error "has not been declared" "" { target *-*-* } 42 } 
-// { dg-error "has not been declared" "" { target *-*-* } 43 } 
-// { dg-error "has not been declared" "" { target *-*-* } 44 } 
-// { dg-error "has not been declared" "" { target *-*-* } 45 } 
-// { dg-error "has not been declared" "" { target *-*-* } 46 } 
-// { dg-error "has not been declared" "" { target *-*-* } 47 } 
-// { dg-error "has not been declared" "" { target *-*-* } 48 } 
index 6f4f2722fca37b48250281ee5f8fdefa2d13a137..3c7f7bf8256228e9a067e48b6460ef8021a81e3c 100644 (file)
 // { dg-do compile }
 // { dg-options "-std=gnu++11" }
 // { dg-require-cstdint "" }
-// { dg-error "not a valid type" "" { target *-*-* } 31 }
 
 // 26.4.3.1 class template linear_congruential_engine [rand.eng.lcong]
 // 26.4.2.2 Concept RandomNumberEngine [rand.concept.eng]
 
 #include <random>
 
-std::linear_congruential_engine<double, 48271, 0, 2147483647> x;
+std::linear_congruential_engine<double, 48271, 0, 2147483647> x; // { dg-error "not a valid type" }
index 5f7994375ee60c79a68108df160ec23a48957d02..dbea9b9c24c06c87a156ba2539c40c222c503eac 100644 (file)
 void test01()
 {
   // Not global scoped, only namespace std.
-  using memory_order;
-  using memory_order_relaxed;
-  using memory_order_consume;
-  using memory_order_acquire;
-  using memory_order_release;
-  using memory_order_acq_rel;
-  using memory_order_seq_cst;
+  using memory_order;          // { dg-error "expected nested-name-specifier" }
+  using memory_order_relaxed;  // { dg-error "expected nested-name-specifier" }
+  using memory_order_consume;  // { dg-error "expected nested-name-specifier" }
+  using memory_order_acquire;  // { dg-error "expected nested-name-specifier" }
+  using memory_order_release;  // { dg-error "expected nested-name-specifier" }
+  using memory_order_acq_rel;  // { dg-error "expected nested-name-specifier" }
+  using memory_order_seq_cst;  // { dg-error "expected nested-name-specifier" }
 
-  using atomic_flag;
+  using atomic_flag;           // { dg-error "expected nested-name-specifier" }
 
-  using atomic_bool;
-  using atomic_char;
-  using atomic_schar;
-  using atomic_uchar;
-  using atomic_short;
-  using atomic_ushort;
-  using atomic_int;
-  using atomic_uint;
-  using atomic_long;
-  using atomic_ulong;
-  using atomic_llong;
-  using atomic_ullong;
-  using atomic_wchar_t;
-  using atomic_char16_t;
-  using atomic_char32_t;
+  using atomic_bool;           // { dg-error "expected nested-name-specifier" }
+  using atomic_char;           // { dg-error "expected nested-name-specifier" }
+  using atomic_schar;          // { dg-error "expected nested-name-specifier" }
+  using atomic_uchar;          // { dg-error "expected nested-name-specifier" }
+  using atomic_short;          // { dg-error "expected nested-name-specifier" }
+  using atomic_ushort;         // { dg-error "expected nested-name-specifier" }
+  using atomic_int;            // { dg-error "expected nested-name-specifier" }
+  using atomic_uint;           // { dg-error "expected nested-name-specifier" }
+  using atomic_long;           // { dg-error "expected nested-name-specifier" }
+  using atomic_ulong;          // { dg-error "expected nested-name-specifier" }
+  using atomic_llong;          // { dg-error "expected nested-name-specifier" }
+  using atomic_ullong;         // { dg-error "expected nested-name-specifier" }
+  using atomic_wchar_t;                // { dg-error "expected nested-name-specifier" }
+  using atomic_char16_t;       // { dg-error "expected nested-name-specifier" }
+  using atomic_char32_t;       // { dg-error "expected nested-name-specifier" }
 
-  using atomic_int_least8_t;
-  using atomic_uint_least8_t;
-  using atomic_int_least16_t;
-  using atomic_uint_least16_t;
-  using atomic_int_least32_t;
-  using atomic_uint_least32_t;
-  using atomic_int_least64_t;
-  using atomic_uint_least64_t;
-  using atomic_int_fast8_t;
-  using atomic_uint_fast8_t;
-  using atomic_int_fast16_t;
-  using atomic_uint_fast16_t;
-  using atomic_int_fast32_t;
-  using atomic_uint_fast32_t;
-  using atomic_int_fast64_t;
-  using atomic_uint_fast64_t;
-  using atomic_intptr_t;
-  using atomic_uintptr_t;
-  using atomic_size_t;
-  using atomic_ptrdiff_t;
-  using atomic_intmax_t;
-  using atomic_uintmax_t;
+  using atomic_int_least8_t;   // { dg-error "expected nested-name-specifier" }
+  using atomic_uint_least8_t;  // { dg-error "expected nested-name-specifier" }
+  using atomic_int_least16_t;  // { dg-error "expected nested-name-specifier" }
+  using atomic_uint_least16_t; // { dg-error "expected nested-name-specifier" }
+  using atomic_int_least32_t;  // { dg-error "expected nested-name-specifier" }
+  using atomic_uint_least32_t; // { dg-error "expected nested-name-specifier" }
+  using atomic_int_least64_t;  // { dg-error "expected nested-name-specifier" }
+  using atomic_uint_least64_t; // { dg-error "expected nested-name-specifier" }
+  using atomic_int_fast8_t;    // { dg-error "expected nested-name-specifier" }
+  using atomic_uint_fast8_t;   // { dg-error "expected nested-name-specifier" }
+  using atomic_int_fast16_t;   // { dg-error "expected nested-name-specifier" }
+  using atomic_uint_fast16_t;  // { dg-error "expected nested-name-specifier" }
+  using atomic_int_fast32_t;   // { dg-error "expected nested-name-specifier" }
+  using atomic_uint_fast32_t;  // { dg-error "expected nested-name-specifier" }
+  using atomic_int_fast64_t;   // { dg-error "expected nested-name-specifier" }
+  using atomic_uint_fast64_t;  // { dg-error "expected nested-name-specifier" }
+  using atomic_intptr_t;       // { dg-error "expected nested-name-specifier" }
+  using atomic_uintptr_t;      // { dg-error "expected nested-name-specifier" }
+  using atomic_size_t;         // { dg-error "expected nested-name-specifier" }
+  using atomic_ptrdiff_t;      // { dg-error "expected nested-name-specifier" }
+  using atomic_intmax_t;       // { dg-error "expected nested-name-specifier" }
+  using atomic_uintmax_t;      // { dg-error "expected nested-name-specifier" }
 
-  using atomic_address;
+  using atomic_address;                // { dg-error "expected nested-name-specifier" }
+  // Present in C++0x drafts but not final C++11 standard:
+  using std::atomic_address;   // { dg-error "has not been declared" }
 }
-
-// { dg-error "expected nested-name-specifier" "" { target *-*-* } 26 }
-// { dg-error "expected nested-name-specifier" "" { target *-*-* } 27 }
-// { dg-error "expected nested-name-specifier" "" { target *-*-* } 28 }
-// { dg-error "expected nested-name-specifier" "" { target *-*-* } 29 }
-// { dg-error "expected nested-name-specifier" "" { target *-*-* } 30 }
-// { dg-error "expected nested-name-specifier" "" { target *-*-* } 31 }
-// { dg-error "expected nested-name-specifier" "" { target *-*-* } 32 }
-// { dg-error "expected nested-name-specifier" "" { target *-*-* } 34 }
-// { dg-error "expected nested-name-specifier" "" { target *-*-* } 36 }
-// { dg-error "expected nested-name-specifier" "" { target *-*-* } 37 }
-// { dg-error "expected nested-name-specifier" "" { target *-*-* } 38 }
-// { dg-error "expected nested-name-specifier" "" { target *-*-* } 39 }
-// { dg-error "expected nested-name-specifier" "" { target *-*-* } 40 }
-// { dg-error "expected nested-name-specifier" "" { target *-*-* } 41 }
-// { dg-error "expected nested-name-specifier" "" { target *-*-* } 42 }
-// { dg-error "expected nested-name-specifier" "" { target *-*-* } 43 }
-// { dg-error "expected nested-name-specifier" "" { target *-*-* } 44 }
-// { dg-error "expected nested-name-specifier" "" { target *-*-* } 45 }
-// { dg-error "expected nested-name-specifier" "" { target *-*-* } 46 }
-// { dg-error "expected nested-name-specifier" "" { target *-*-* } 47 }
-// { dg-error "expected nested-name-specifier" "" { target *-*-* } 48 }
-// { dg-error "expected nested-name-specifier" "" { target *-*-* } 49 }
-// { dg-error "expected nested-name-specifier" "" { target *-*-* } 50 }
-// { dg-error "expected nested-name-specifier" "" { target *-*-* } 52 }
-// { dg-error "expected nested-name-specifier" "" { target *-*-* } 53 }
-// { dg-error "expected nested-name-specifier" "" { target *-*-* } 54 }
-// { dg-error "expected nested-name-specifier" "" { target *-*-* } 55 }
-// { dg-error "expected nested-name-specifier" "" { target *-*-* } 56 }
-// { dg-error "expected nested-name-specifier" "" { target *-*-* } 57 }
-// { dg-error "expected nested-name-specifier" "" { target *-*-* } 58 }
-// { dg-error "expected nested-name-specifier" "" { target *-*-* } 59 }
-// { dg-error "expected nested-name-specifier" "" { target *-*-* } 60 }
-// { dg-error "expected nested-name-specifier" "" { target *-*-* } 61 }
-// { dg-error "expected nested-name-specifier" "" { target *-*-* } 62 }
-// { dg-error "expected nested-name-specifier" "" { target *-*-* } 63 }
-// { dg-error "expected nested-name-specifier" "" { target *-*-* } 64 }
-// { dg-error "expected nested-name-specifier" "" { target *-*-* } 65 }
-// { dg-error "expected nested-name-specifier" "" { target *-*-* } 66 }
-// { dg-error "expected nested-name-specifier" "" { target *-*-* } 67 }
-// { dg-error "expected nested-name-specifier" "" { target *-*-* } 68 }
-// { dg-error "expected nested-name-specifier" "" { target *-*-* } 69 }
-// { dg-error "expected nested-name-specifier" "" { target *-*-* } 70 }
-// { dg-error "expected nested-name-specifier" "" { target *-*-* } 71 }
-// { dg-error "expected nested-name-specifier" "" { target *-*-* } 72 }
-// { dg-error "expected nested-name-specifier" "" { target *-*-* } 73 }
-// { dg-error "expected nested-name-specifier" "" { target *-*-* } 75 }