Patchwork C++11, implement delegating constructors

login
register
mail settings
Submitter ville
Date Sept. 20, 2011, 5:53 p.m.
Message ID <878vpj2j8b.wl%ville@ville-laptop>
Download mbox | patch
Permalink /patch/115616/
State New
Headers show

Comments

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

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;