summaryrefslogtreecommitdiff
path: root/gcc/cp/error.c
diff options
context:
space:
mode:
authorjason <jason@138bc75d-0d04-0410-961f-82ee72b054a4>2011-12-05 15:49:25 +0000
committerjason <jason@138bc75d-0d04-0410-961f-82ee72b054a4>2011-12-05 15:49:25 +0000
commit90510c63d8552fc06febb5a01d79b5d040ea3648 (patch)
tree34698b82ecd5ca13de0629ef51d816a609fbb6ea /gcc/cp/error.c
parentd3ab3840727ce26425a169e7595f0c4af490f675 (diff)
downloadgcc-90510c63d8552fc06febb5a01d79b5d040ea3648.tar.gz
Implement C++11 delegating constructors.
* cp-tree.h (enum cpp0x_warn_str): Add CPP0X_DELEGATING_CTORS. * error.c (maybe_warn_cpp0x): Adjust. * parser.c (cp_parser_mem_initializer_list): Use it. Diagnose multiple initializers if a delegating initializer is present. * call.c (build_special_member_call): Convert an assert into an if. * init.c (perform_target_ctor): New. (emit_mem_initializers): Use it. (expand_member_init, expand_default_init): Adjust. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@182012 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/cp/error.c')
-rw-r--r--gcc/cp/error.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/gcc/cp/error.c b/gcc/cp/error.c
index 4940a783353..21d6781567e 100644
--- a/gcc/cp/error.c
+++ b/gcc/cp/error.c
@@ -3304,6 +3304,11 @@ maybe_warn_cpp0x (cpp0x_warn_str str)
"user-defined literals "
"only available with -std=c++11 or -std=gnu++11");
break;
+ case CPP0X_DELEGATING_CTORS:
+ pedwarn (input_location, 0,
+ "delegating constructors "
+ "only available with -std=c++11 or -std=gnu++11");
+ break;
default:
gcc_unreachable ();
}