You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@orc.apache.org by "Dongjoon Hyun (Jira)" <ji...@apache.org> on 2022/03/29 23:01:00 UTC
[jira] [Commented] (ORC-1134) [C++] Compile error when switching branches
[ https://issues.apache.org/jira/browse/ORC-1134?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17514359#comment-17514359 ]
Dongjoon Hyun commented on ORC-1134:
------------------------------------
Do you mean you switch branches (e.g. from `main` to `branch-1.7`) without `git clean -fdx`?
Or, do you mean you switch branch from `main` to your feature branch?
> [C++] Compile error when switching branches
> -------------------------------------------
>
> Key: ORC-1134
> URL: https://issues.apache.org/jira/browse/ORC-1134
> Project: ORC
> Issue Type: Bug
> Components: C++
> Reporter: Quanlong Huang
> Priority: Major
>
> I always encounter this issue when switching branches:
> {code:java}
> In file included from /home/quanlong/workspace/orc/c++/src/Reader.cc:19:
> /home/quanlong/workspace/orc/c++/src/Reader.cc: In function ‘std::unique_ptr<orc::proto::PostScript> orc::readPostscript(orc::InputStream*, orc::DataBuffer<char>*, uint64_t)’:
> /home/quanlong/workspace/orc/c++/src/Adaptor.hh:127:40: error: moving a local object in a return statement prevents copy elision [-Werror=pessimizing-move]
> 127 | #define REDUNDANT_MOVE(XXX) std::move(XXX)
> | ~~~~~~~~~^~~~~
> /home/quanlong/workspace/orc/c++/src/Reader.cc:1263:12: note: in expansion of macro ‘REDUNDANT_MOVE’
> 1263 | return REDUNDANT_MOVE(postscript);
> | ^~~~~~~~~~~~~~
> /home/quanlong/workspace/orc/c++/src/Adaptor.hh:127:40: note: remove ‘std::move’ call
> 127 | #define REDUNDANT_MOVE(XXX) std::move(XXX)
> | ~~~~~~~~~^~~~~
> /home/quanlong/workspace/orc/c++/src/Reader.cc:1263:12: note: in expansion of macro ‘REDUNDANT_MOVE’
> 1263 | return REDUNDANT_MOVE(postscript);
> | ^~~~~~~~~~~~~~
> /home/quanlong/workspace/orc/c++/src/Reader.cc: In function ‘std::unique_ptr<orc::proto::Footer> orc::readFooter(orc::InputStream*, const orc::DataBuffer<char>*, uint64_t, const orc::proto::PostScript&, orc::MemoryPool&)’:
> /home/quanlong/workspace/orc/c++/src/Adaptor.hh:127:40: error: moving a local object in a return statement prevents copy elision [-Werror=pessimizing-move]
> 127 | #define REDUNDANT_MOVE(XXX) std::move(XXX)
> | ~~~~~~~~~^~~~~
> /home/quanlong/workspace/orc/c++/src/Reader.cc:1337:12: note: in expansion of macro ‘REDUNDANT_MOVE’
> 1337 | return REDUNDANT_MOVE(footer);
> | ^~~~~~~~~~~~~~
> /home/quanlong/workspace/orc/c++/src/Adaptor.hh:127:40: note: remove ‘std::move’ call
> 127 | #define REDUNDANT_MOVE(XXX) std::move(XXX)
> | ~~~~~~~~~^~~~~
> /home/quanlong/workspace/orc/c++/src/Reader.cc:1337:12: note: in expansion of macro ‘REDUNDANT_MOVE’
> 1337 | return REDUNDANT_MOVE(footer);
> | ^~~~~~~~~~~~~~ {code}
> Removing orc/c++/src/Adaptor.hh can workaround this.
--
This message was sent by Atlassian Jira
(v8.20.1#820001)