Hi,
I was playing around with trying to compile ChibiOS using clang, and I found a compilation error that is actually caused by invalid code inside the C++ wrapper.
Basically, the `ThreadsPool::start` method accesses the `MemoryPool::pool` private member directly.
I'm not sure why GCC allows this, but for clang this is an error.
Attached you can find a patch which fixes the problem by adding a getter to the MemoryPool class.
The patch is based on the `stable_21.11.x` branch of the GitHub mirror.
Access to private member inside C++ wrapper Topic is solved
-
Dirtcrusher
- Posts: 2
- Joined: Mon Sep 09, 2019 2:29 pm
- Has thanked: 2 times
- Been thanked: 2 times
Access to private member inside C++ wrapper
- Attachments
-
- private_member_patch.zip
- (644 Bytes) Downloaded 258 times
- Giovanni
- Site Admin
- Posts: 14891
- Joined: Wed May 27, 2009 8:48 am
- Has thanked: 1202 times
- Been thanked: 996 times