Re: [PATCH] C++11, implement delegating constructors

2011-12-05 Thread Ville Voutilainen
On 5 December 2011 17:51, Jason Merrill wrote: > While applying it I noticed that we were sharing the argument trees between > the two calls in a way that might be problematic, and I went ahead and fixed > that. Ouch. Thanks. > I noticed that template/meminit1.C is ill-formed in C++11 as well, d

Re: [PATCH] C++11, implement delegating constructors

2011-12-05 Thread Jason Merrill
OK, I finally got permission from the FSF to put this patch in, and since it was posted before the end of stage 1 it can still go in. While applying it I noticed that we were sharing the argument trees between the two calls in a way that might be problematic, and I went ahead and fixed that.

Re: [PATCH] C++11, implement delegating constructors

2011-10-02 Thread Ville Voutilainen
At Wed, 21 Sep 2011 02:34:22 +0300, Ville Voutilainen wrote: > > On 21 September 2011 02:18, Ville Voutilainen > wrote: > > Ok, a new patch: > I just noticed that I have tabs disabled. You may want to tabify the patch. Tabified and rebased on top of the nsdmi changes. Changelog unchanged. diff

Re: [PATCH] C++11, implement delegating constructors

2011-09-20 Thread Jason Merrill
Looks good, thanks. Jason

Re: [PATCH] C++11, implement delegating constructors

2011-09-20 Thread Ville Voutilainen
On 21 September 2011 02:18, Ville Voutilainen wrote: > Ok, a new patch: I just noticed that I have tabs disabled. You may want to tabify the patch.

Re: [PATCH] C++11, implement delegating constructors

2011-09-20 Thread Ville Voutilainen
At Tue, 20 Sep 2011 19:05:32 -0400, Jason Merrill wrote: > We don't need a new variable, just use basetype. TYPE_MAIN_VARIANT > shouldn't affect the comparison to current_class_type. > > > + error ("mem-initializer for %qD follows constructor delegation; " > > +"previous target c

Re: [PATCH] C++11, implement delegating constructors

2011-09-20 Thread Jason Merrill
On 09/20/2011 06:17 PM, Ville Voutilainen wrote: I find it hard to see what exactly changes there. Even if I restore the indentation level, git still shows a diff. Perhaps there were tabs in it... Yes, the change is probably tabs vs. spaces. else if (TYPE_P (name)) { basetyp

Re: [PATCH] C++11, implement delegating constructors

2011-09-20 Thread Ville Voutilainen
At Tue, 20 Sep 2011 17:05:55 -0400, Jason Merrill wrote: > Try to avoid reformatting lines that you don't actually change. I find it hard to see what exactly changes there. Even if I restore the indentation level, git still shows a diff. Perhaps there were tabs in it... > > + if (init == void_ty

Re: [PATCH] C++11, implement delegating constructors

2011-09-20 Thread Jason Merrill
On 09/20/2011 01:29 PM, Ville Voutilainen wrote: 2011-09-20 Ville Voutilainen Implement delegating constructors. Based on an original patch by Pedro Lamarao. Looks good, just a few minor comments: - build2 (EQ_EXPR, boolean_type_node, -

Re: [PATCH] C++11, implement delegating constructors

2011-09-20 Thread Ville Voutilainen
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 > struct S > { > - S() : S() {} // { dg-error "base" } > + S() : S() {} > }; > > -S s; // { dg-message

[PATCH] C++11, implement delegating constructors

2011-09-20 Thread Ville Voutilainen
Tested on Linux/X86-32. 2011-09-20 Ville Voutilainen Implement delegating constructors. Based on an original patch by Pedro Lamarao. * cp-tree.h (enum cpp0x_warn_str): Add CPP0X_DELEGATING_CTORS. * error.c (maybe_warn_cpp0x): Adjust. * parser