This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: C++ PATCH for c++/47999 (incorrect auto deduction in template)
- From: "H.J. Lu" <hjl dot tools at gmail dot com>
- To: Jason Merrill <jason at redhat dot com>
- Cc: gcc-patches List <gcc-patches at gcc dot gnu dot org>
- Date: Wed, 16 Mar 2011 22:33:13 -0700
- Subject: Re: C++ PATCH for c++/47999 (incorrect auto deduction in template)
- References: <4D80E409.10507@redhat.com>
On Wed, Mar 16, 2011 at 9:23 AM, Jason Merrill <jason@redhat.com> wrote:
> In templates, we do overload resolution and then throw away most of it,
> going back to the pre-conversion arguments. ?But when the call returns a
> reference, we shouldn't elide the dereference and pretend it returns by
> value, as that confuses lvalue_p.
>
> Tested x86_64-pc-linux-gnu, applying to trunk.
>
>
> commit 79330512f8ade4ecff47ab8cb8c050440d9648e0
> Author: Jason Merrill <jason@redhat.com>
> Date: ? Tue Mar 8 08:46:41 2011 -0500
>
> ? ? ? ?PR c++/47999
> ? ? ? ?* semantics.c (finish_call_expr): Preserve reference semantics
> ? ? ? ?in templates.
>
This may have caused:
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48162
--
H.J.