aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp/semantics.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/cp/semantics.c')
-rw-r--r--gcc/cp/semantics.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/gcc/cp/semantics.c b/gcc/cp/semantics.c
index 0f671ae..576d931 100644
--- a/gcc/cp/semantics.c
+++ b/gcc/cp/semantics.c
@@ -1063,6 +1063,15 @@ finish_named_return_value (return_id, init)
DECL_UNINLINABLE (current_function_decl) = 1;
}
+/* Begin processing a mem-initializer-list. */
+
+void
+begin_mem_initializers ()
+{
+ if (! DECL_CONSTRUCTOR_P (current_function_decl))
+ error ("only constructors take base initializers");
+}
+
/* The INIT_LIST is a list of mem-initializers, in the order they were
written by the user. The TREE_VALUE of each node is a list of
initializers for a particular subobject. The TREE_PURPOSE is a