This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
(C++) patch to grok_reference_init
- To: gcc-patches at gcc dot gnu dot org
- Subject: (C++) patch to grok_reference_init
- From: Jason Merrill <jason at cygnus dot com>
- Date: Wed, 31 May 2000 01:14:05 -0700
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;