This is the mail archive of the gcc-patches@gcc.gnu.org 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]

(C++) patch to grok_reference_init


Reference initialization is not a direct-initialization context.  Fixes
g++.other/explicit1.C.

2000-05-30  Jason Merrill  <jason@decepticon.cygnus.com>

	* decl.c (grok_reference_init): Pass LOOKUP_ONLYCONVERTING.

Index: decl.c
===================================================================
RCS file: /cvs/gcc/egcs/gcc/cp/decl.c,v
retrieving revision 1.616
diff -c -p -r1.616 decl.c
*** decl.c	2000/05/30 15:44:19	1.616
--- decl.c	2000/05/31 08:13:08
*************** grok_reference_init (decl, type, init)
*** 7409,7415 ****
       first.  */
    tmp = convert_to_reference
      (type, init, CONV_IMPLICIT,
!      LOOKUP_SPECULATIVELY|LOOKUP_NORMAL|DIRECT_BIND, decl);
  
    if (tmp == error_mark_node)
      return;
--- 7409,7416 ----
       first.  */
    tmp = convert_to_reference
      (type, init, CONV_IMPLICIT,
!      LOOKUP_ONLYCONVERTING|LOOKUP_SPECULATIVELY|LOOKUP_NORMAL|DIRECT_BIND,
!      decl);
  
    if (tmp == error_mark_node)
      return;

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