This is the mail archive of the gcc@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]

Re: Named Return Value Extension Proposal


>>>>> «ERT», E Robert Tisdale <edwin@netwood.net> wrote:

ERT> My egcs-2.90.29 980515 (egcs-1.0.3 release) compiler 
ERT> does not always elide copy constructors as permitted
ERT> by the ANSI C++ standard so I propose an extension
ERT> to the C++ language similar to named return values
ERT> which the C++ programmer can use to help the compiler
ERT> identify names which reference the return value.

[...]

ERT> Function X f2(int) illustrates the named return value extension
ERT> as currently supported by my egcs compiler.  See the GCC manual at

ERT>         http://egcs.cygnus.com/onlinedocs/gcc_5.html#SEC102

ERT> The current extension is very old now and it seems unlikely to me
ERT> that it will ever be adopted as part of the ANSI C++ standard.
ERT> It solves the problem that the egcs compiler has with function X f1(int)
ERT> but the function definition is entirely incompatible with ANSI C++ and
ERT> it cannot solve the problem that the compiler has with function X g0(X).

[...]


I don't know what will be decided, but let me throw my 0.02 euros
there. I certainly don't minimize the inmportance of compiler level
optimizations. But it's my opinion that there are ISO C++ language
features--not optimizations--that need to be fixed or implemented
in the compiler. That already is a lot of work to do. I'm not
particulary interested in seeing a lot of work spent in implementing
non-stantdard features, that will probably badly interact with ISO
C++, whereas there are more fundamental topics waiting to be
addressed.

So my proposal will be: let's first catch up the Standard, then we'll
address optimizations issues.

Not just a particular optimization is _permitted_ that it means the
compiler *should* implement it, particullary when the compiler is
trying hard to get semantics right.

just my 0.02 euros.

-- Gaby


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