This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: C++0x Constructor Delegation take 2


Hi Pedro,

I have a few small comments to make about this version of the patch.
Otherwise, it looks good to me. However, I don't have the ability to
approve it. Nathan, could you take a look?

Index: gcc/testsuite/g++.dg/cpp0x/dc_02.C
===================================================================
--- gcc/testsuite/g++.dg/cpp0x/dc_02.C	(revisão 0)
+++ gcc/testsuite/g++.dg/cpp0x/dc_02.C	(revisão 0)
@@ -0,0 +1,35 @@
+// { dg-do compile }
+// { dg-options --std=gnu++0x }

I suggest using "-std=c++0x", since delegating constructors are in the
C++0x Working Paper (we're not relying on extensions at all).

+/* Initialize current class with INIT, a TREE_LIST of
+   arguments for a target constructor. If TREE_LIST is void_type_node,
+   an empty initializer list was given.  */
+
+static void
+perform_target_ctor (tree init)

I suggest adding a comment stating that this routine implements the
delegating constructors feature of C++0x.

- Doug


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]