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]
Other format: [Raw text]

Re: [C++ PATCH] Fix decltype for calls to function pointers, references


Doug Gregor wrote:
This little patch corrects the result of decltype when applied to a
call to a function pointer, function reference, or member function
pointer.

Okay for mainline and 4.3?

- Doug

2008-07-14 Douglas Gregor <doug.gregor@gmail.com>

* g++.dg/cpp0x/decltype12.C: New.

Just to be clear, the point of the complex handling of CALL_EXPR is that if you call a function that returns a reference, then the decltype of the call is the reference type, rather than the type without the reference? (I'm just checking why the answer is just TREE_TYPE (call_expr).)


The patch is OK, assuming that's approximately the explanation.

--
Mark Mitchell
CodeSourcery
mark@codesourcery.com
(650) 331-3385 x713


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