You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently the code uses implicit generation of the copy constructors in some places.
Since C++11 this is declared as deprecated and therefore troughs warnings.
compile sources with -Wall -Wextra or -Wdeprecated-copy in GCC (we use gcc-arm-none-eabi-10.3-2021.10)
Expected behavior
No -Wdeprecated-copy warning are in build output
Desktop
OS: Build machine is Windows (GCC cross-compiled compiled for own eRPC uC/OS-II port, but shouldn't matter at all for this issue)
eRPC Version: 1.12.0
Steps you didn't forgot to do
I checked if there is no related issue opened/closed.
I checked that there doesn't exist opened PR which is solving this issue.
Additional context
If I'm right it should be enough to add = default to the corresponding copy-constructors (available since C++11)
In VS Code i did use following regex to search for copy constructors (?<=\s|^)(\w+)(\(.*\1.*&.+\)) and there seems to be only the above mentioned one in the C/C++ integration code, that is not there to "delete" / hide the copy constructor (they could also be deleted with a = delete).
Not 100% sure if this change is feasible and results in the expected behavior.
Update:
Should be fairly simply to fix by adding (not 100% sure, as I'm not a C++ expert):
Describe the bug
Currently the code uses implicit generation of the copy constructors in some places.
Since C++11 this is declared as deprecated and therefore troughs warnings.
In my build I do see the warning at erpc_c/infra/erpc_message_buffer.hpp Line 57, but ther might be more places.
To Reproduce
compile sources with
-Wall -Wextra
or-Wdeprecated-copy
in GCC (we use gcc-arm-none-eabi-10.3-2021.10)Expected behavior
No -Wdeprecated-copy warning are in build output
Desktop
Steps you didn't forgot to do
Additional context
If I'm right it should be enough to add
= default
to the corresponding copy-constructors (available since C++11)In VS Code i did use following regex to search for copy constructors
(?<=\s|^)(\w+)(\(.*\1.*&.+\))
and there seems to be only the above mentioned one in the C/C++ integration code, that is not there to "delete" / hide the copy constructor (they could also be deleted with a= delete
).Not 100% sure if this change is feasible and results in the expected behavior.
Update:
Should be fairly simply to fix by adding (not 100% sure, as I'm not a C++ expert):
The text was updated successfully, but these errors were encountered: