diff options
author | Jason Merrill <jason@redhat.com> | 2016-10-06 17:24:40 -0400 |
---|---|---|
committer | Jason Merrill <jason@gcc.gnu.org> | 2016-10-06 17:24:40 -0400 |
commit | b7558a2c1f87e374c48fa2be8e3ab93e1b3c68b0 (patch) | |
tree | c9167e38db4b5297835f67da69fdb6b691450d9f /gcc/doc | |
parent | 937ec71aba5b3c633bd5979d6346254e83f46d1c (diff) | |
download | gcc-b7558a2c1f87e374c48fa2be8e3ab93e1b3c68b0.zip gcc-b7558a2c1f87e374c48fa2be8e3ab93e1b3c68b0.tar.gz gcc-b7558a2c1f87e374c48fa2be8e3ab93e1b3c68b0.tar.bz2 |
C++17 copy elision improvements.
* call.c (build_temp, convert_like_real): Don't re-copy
TARGET_EXPR. Handle packed fields.
(build_x_va_arg): Wrap it in a TARGET_EXPR.
(build_over_call): Add sanity check.
* cvt.c (early_elide_copy): New.
(ocp_convert): Use it.
* except.c (build_throw): Use it.
* init.c (get_nsdmi): Put back the TARGET_EXPR.
(expand_default_init): Call early_elide_copy.
* typeck.c (cp_build_modify_expr): Call early_elide_copy.
From-SVN: r240845
Diffstat (limited to 'gcc/doc')
-rw-r--r-- | gcc/doc/invoke.texi | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi index d9667e7..22af6e4 100644 --- a/gcc/doc/invoke.texi +++ b/gcc/doc/invoke.texi @@ -2325,7 +2325,11 @@ release of G++. The C++ standard allows an implementation to omit creating a temporary that is only used to initialize another object of the same type. Specifying this option disables that optimization, and forces G++ to -call the copy constructor in all cases. +call the copy constructor in all cases. This option also causes G++ +to call trivial member functions which otherwise would be expanded inline. + +In C++17, the compiler is required to omit these temporaries, but this +option still affects trivial member functions. @item -fno-enforce-eh-specs @opindex fno-enforce-eh-specs |