diff options
author | Ville Voutilainen <ville.voutilainen@gmail.com> | 2011-12-05 17:49:25 +0200 |
---|---|---|
committer | Jason Merrill <jason@gcc.gnu.org> | 2011-12-05 10:49:25 -0500 |
commit | 238e471cadfb1c2995e6bc4c995328eacc39d0da (patch) | |
tree | 34698b82ecd5ca13de0629ef51d816a609fbb6ea /gcc/cp/error.c | |
parent | 12c574caf6f0766266813fef7be8a2367a9d0700 (diff) | |
download | gcc-238e471cadfb1c2995e6bc4c995328eacc39d0da.zip gcc-238e471cadfb1c2995e6bc4c995328eacc39d0da.tar.gz gcc-238e471cadfb1c2995e6bc4c995328eacc39d0da.tar.bz2 |
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.
Co-Authored-By: Pedro LamarĂ£o <pedro.lamarao@gmail.com>
From-SVN: r182012
Diffstat (limited to 'gcc/cp/error.c')
-rw-r--r-- | gcc/cp/error.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/gcc/cp/error.c b/gcc/cp/error.c index 4940a78..21d6781 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 (); } |