Skip to content

Missing virtual destructors on Apple Clang version 10.0 #563

@greimela-si

Description

@greimela-si

Bug report

Required Info:

  • Operating System:
    • macOS 10.14 Mojave
  • Installation type:
    • from source
  • Version or commit hash:
    • 6ff3ff4
  • DDS implementation:
    • Fast-RTPS

Steps to reproduce issue

Build rclcpp from source using Clang with version 10.

$ clang -v
Apple LLVM version 10.0.0 (clang-1000.11.45.2)
Target: x86_64-apple-darwin18.0.0
Thread model: posix

Expected behavior

rclcpp builds without errors.

Actual behavior

rclcpp fails due to warnings about missing virtual destructors.
Error:

rclcpp::message_memory_strategy::MessageMemoryStrategy<rcutils_char_array_t, 
std::__1::allocator<void> >' that has virtual functions but non-virtual destructor
[-Werror,-Wdelete-non-virtual-dtor]

All in all these classes are affected:

include/rclcpp/intra_process_manager_impl.hpp
include/rclcpp/memory_strategy.hpp
include/rclcpp/message_memory_strategy.hpp

Additional information

Adding the virtual destructors fixes the issue.
Unfortunately I can't create the PR myself.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions