diff options
author | Benoit Foucher <benoit@zeroc.com> | 2009-02-17 11:01:02 +0100 |
---|---|---|
committer | Benoit Foucher <benoit@zeroc.com> | 2009-02-17 11:01:02 +0100 |
commit | 22f005372107b9c6023fd30efc47e2c616727de2 (patch) | |
tree | 109ed3065d6f1cb3e150f109d1c4ba39ed0737b8 /cpp/src/slice2cpp/Gen.cpp | |
parent | Bug 3668 - C# translator generates bogus code for metadata. (diff) | |
download | ice-22f005372107b9c6023fd30efc47e2c616727de2.tar.bz2 ice-22f005372107b9c6023fd30efc47e2c616727de2.tar.xz ice-22f005372107b9c6023fd30efc47e2c616727de2.zip |
Fixed bug 3734 and added comment for bug 3619
Diffstat (limited to 'cpp/src/slice2cpp/Gen.cpp')
-rw-r--r-- | cpp/src/slice2cpp/Gen.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/cpp/src/slice2cpp/Gen.cpp b/cpp/src/slice2cpp/Gen.cpp index 513b9f684ee..38576ced309 100644 --- a/cpp/src/slice2cpp/Gen.cpp +++ b/cpp/src/slice2cpp/Gen.cpp @@ -2715,6 +2715,11 @@ Slice::Gen::DelegateMVisitor::visitOperation(const OperationPtr& p) } C << nl << "bool __ok = __og.invoke();"; + + // + // Declare the return __ret variable at the top-level scope to + // enable NRVO with GCC (see also bug #3619). + // writeAllocateCode(C, ParamDeclList(), ret, p->getMetaData(), _useWstring); if(!p->returnsData()) { |