C++11, implement delegating constructors

Submitted by ville on Sept. 20, 2011, 5:53 p.m.

Details

Message ID 878vpj2j8b.wl%ville@ville-laptop
State New
Headers show

Commit Message

ville Sept. 20, 2011, 5:53 p.m.
At Tue, 20 Sep 2011 20:29:27 +0300,
Ville Voutilainen wrote:
> --- a/gcc/testsuite/g++.dg/template/meminit1.C
> +++ b/gcc/testsuite/g++.dg/template/meminit1.C
> @@ -2,7 +2,7 @@
>  template <class T >
>  struct S
>  {
> -  S() : S() {} // { dg-error "base" }
> +  S() : S() {}
>  };
>  
> -S<int> s; // { dg-message "required" }
> +S<int> s; // { dg-warning "delegating constructors" }

Duh. That dg-warning should be on line 5, not 8.
Incremental patch follows. Pardon the haste.

Patch hide | download patch | download mbox

diff --git a/gcc/testsuite/g++.dg/template/meminit1.C b/gcc/testsuite/g++.dg/template/meminit1.C
index fc31828..efdbe80 100644
--- a/gcc/testsuite/g++.dg/template/meminit1.C
+++ b/gcc/testsuite/g++.dg/template/meminit1.C
@@ -2,7 +2,7 @@ 
 template <class T >
 struct S
 {
-  S() : S() {}
+  S() : S() {} // { dg-warning "delegating constructors" }
 };
 
-S<int> s; // { dg-warning "delegating constructors" }
+S<int> s;