This is the mail archive of the mailing list for the GCC project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: C++ pcc struct return fix

> OK, it looks like initialize_handler_parm is already using DIRECT_BIND this
> way, so it's just a documentation issue.  This patch is OK for trunk and
> branch; please also adjust the comment about DIRECT_BIND in cp-tree.h to
> reflect this usage.

How does this look?

J. David Anglin                        
National Research Council of Canada              (613) 990-0752 (FAX: 952-6605)

2001-12-03  John David Anglin  <>

	* semantics.c (simplify_aggr_init_exprs_r): Add DIRECT_BIND flag in
	call to build_aggr_init.
	* cp-tree.h (DIRECT_BIND): Document new use of DIRECT_BIND.

--- semantics.c.orig	Wed Apr 18 13:51:48 2001
+++ semantics.c	Wed Apr 18 18:16:58 2001
@@ -2240,7 +2240,8 @@
       int old_ac = flag_access_control;
       flag_access_control = 0;
-      call_expr = build_aggr_init (slot, call_expr, LOOKUP_ONLYCONVERTING);
+      call_expr = build_aggr_init (slot, call_expr,
       flag_access_control = old_ac;
       copy_from_buffer_p = 1;
---	Mon Dec  3 13:26:15 2001
+++ cp-tree.h	Mon Dec  3 14:01:31 2001
@@ -3309,7 +3309,9 @@
    LOOKUP_ONLYCONVERTING means that non-conversion constructors are not tried.
    DIRECT_BIND means that if a temporary is created, it should be created so
      that it lives as long as the current variable bindings; otherwise it
-     only lives until the end of the complete-expression.
+     only lives until the end of the complete-expression.  It indicates in
+     reference initialization and in catching an exception that we don't
+     need a new constructor.
    LOOKUP_SPECULATIVELY means return NULL_TREE if we cannot find what we are
      after.  Note, LOOKUP_COMPLAIN is checked and error messages printed
      before LOOKUP_SPECULATIVELY is checked.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]