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: [patch] Extend return by invisible reference mechanism


On 04/08/2010 07:01 AM, Eric Botcazou wrote:
Well, fndecl is needed for the DECL_RESULT check and ...

That I'm removing.


How did you test the patch? I believe that removing

-  if (TREE_CODE (exp) == CALL_EXPR&&  fndecl&&  DECL_RESULT (fndecl)
-&&  DECL_BY_REFERENCE (DECL_RESULT (fndecl)))

might regress the C++ frontend as that also sets DECL_BY_REFERENCE
on RESULT_DECLs.

No, it doesn't, all languages are clean. C++ doesn't need this check.

Yep, C++ just relies on TREE_ADDRESSABLE of the return type. Sounds fine to me.


Jason


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