diff options
author | Jason Merrill <jason@gcc.gnu.org> | 2011-11-21 14:27:17 -0500 |
---|---|---|
committer | Jason Merrill <jason@gcc.gnu.org> | 2011-11-21 14:27:17 -0500 |
commit | f3fae478f43753041564b94a9b002f399c6576fb (patch) | |
tree | 8e73bd7c32a95e4972e2814f4e8645273a135e17 /gcc/cp | |
parent | c6084f681e097e269b374f990837305c7b5bd04d (diff) | |
download | gcc-f3fae478f43753041564b94a9b002f399c6576fb.zip gcc-f3fae478f43753041564b94a9b002f399c6576fb.tar.gz gcc-f3fae478f43753041564b94a9b002f399c6576fb.tar.bz2 |
tweak comment in perform_member_init
From-SVN: r181594
Diffstat (limited to 'gcc/cp')
-rw-r--r-- | gcc/cp/init.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/gcc/cp/init.c b/gcc/cp/init.c index 5c20e32..7e9ad54 100644 --- a/gcc/cp/init.c +++ b/gcc/cp/init.c @@ -598,7 +598,9 @@ perform_member_init (tree member, tree init) init = digest_init (type, init, tf_warning_or_error); if (init == error_mark_node) return; - /* Use 'this' as the decl, as it has the lifetime we want. */ + /* A FIELD_DECL doesn't really have a suitable lifetime, but + make_temporary_var_for_ref_to_temp will treat it as automatic and + set_up_extended_ref_temp wants to use the decl in a warning. */ init = extend_ref_init_temps (member, init, &cleanups); if (TREE_CODE (type) == ARRAY_TYPE && TYPE_HAS_NONTRIVIAL_DESTRUCTOR (TREE_TYPE (type))) |