From mboxrd@z Thu Jan 1 00:00:00 1970 From: Gabriel Dos Reis To: egcs@egcs.cygnus.com Subject: Re: Named Return Value Extension Proposal Date: Mon, 22 Mar 1999 19:39:00 -0000 Message-id: In-reply-to: "E. Robert Tisdale"'s message of "Mon, 22 Mar 1999 18:55:25 -0800" References: <36F7029D.F0EE48E8@netwood.net> X-SW-Source: 1999-03/msg00737.html >>>>> «ERT», E Robert Tisdale wrote: > Gaby, You and I will both grow very old and die > before this compiler catches up with the standard. Probably. But I don't consider it a reason to make harder the already painful task of attempting to implement it. Neither a reason to *require* EGCS developpers to implement a language beside the scope of ISO C++. > I don't think that it is too unreasonable for me and other users > to expect the compiler to produce reasonably fast and efficient code > without hacking our source to work around a deficient optimizer. > It appears from the reply by Jason Merrill > to the "elided copy constructors" thread that it will be a very long time > before the changes can be made to implement the optimizations > permitted by the standard. I am simply proposing a stop gap > to carry us through until it is possible to implement the optimizations. It will take long time to any compiler to implement optimizations permitted by ISO C++. > I have taken some pain to ensure that the proposed extensions > will not interact badly with the ANSI/ISO C++ standard. > Please let us know if you see something wrong that I don't see. Well, as the named return value is an optimization, how can an application programmer can portably, that is in the scope of ISO C++, detect whether the compiler is supporting or is going to perform the named return optimization? He will have to resort to some crippled extensions. That extension would require lot of work from compiler writers. Given your extension how would the compiler detect that an application programmer really wanted the NRVO and didn't make a synatxe error? Ah, the compiler should assume the application programmer can never make such an error? Don't get me wrong. I'm highly concerned with optimizations especially the NRVO; I would be happy to see it in EGCS. But given the state of the EGCS/g++ compiler, I would like to see work spent on fixing more fundamental bugs and implementing lacking features (not optimizations). I don't consider the NRVO as an urgent issue. You don't have to agree with me, but just accept I have another opinion on the question. -- Gaby From mboxrd@z Thu Jan 1 00:00:00 1970 From: Gabriel Dos Reis To: egcs@egcs.cygnus.com Subject: Re: Named Return Value Extension Proposal Date: Wed, 31 Mar 1999 23:46:00 -0000 Message-ID: References: <36F7029D.F0EE48E8@netwood.net> X-SW-Source: 1999-03n/msg00742.html Message-ID: <19990331234600.pGv6T41aaWMNEo_EdXPCbktE5Qq7Fj9gpgF6Y0MkhOc@z> >>>>> «ERT», E Robert Tisdale wrote: > Gaby, You and I will both grow very old and die > before this compiler catches up with the standard. Probably. But I don't consider it a reason to make harder the already painful task of attempting to implement it. Neither a reason to *require* EGCS developpers to implement a language beside the scope of ISO C++. > I don't think that it is too unreasonable for me and other users > to expect the compiler to produce reasonably fast and efficient code > without hacking our source to work around a deficient optimizer. > It appears from the reply by Jason Merrill > to the "elided copy constructors" thread that it will be a very long time > before the changes can be made to implement the optimizations > permitted by the standard. I am simply proposing a stop gap > to carry us through until it is possible to implement the optimizations. It will take long time to any compiler to implement optimizations permitted by ISO C++. > I have taken some pain to ensure that the proposed extensions > will not interact badly with the ANSI/ISO C++ standard. > Please let us know if you see something wrong that I don't see. Well, as the named return value is an optimization, how can an application programmer can portably, that is in the scope of ISO C++, detect whether the compiler is supporting or is going to perform the named return optimization? He will have to resort to some crippled extensions. That extension would require lot of work from compiler writers. Given your extension how would the compiler detect that an application programmer really wanted the NRVO and didn't make a synatxe error? Ah, the compiler should assume the application programmer can never make such an error? Don't get me wrong. I'm highly concerned with optimizations especially the NRVO; I would be happy to see it in EGCS. But given the state of the EGCS/g++ compiler, I would like to see work spent on fixing more fundamental bugs and implementing lacking features (not optimizations). I don't consider the NRVO as an urgent issue. You don't have to agree with me, but just accept I have another opinion on the question. -- Gaby