Page 1 of 1

Access to private member inside C++ wrapper

Posted: Thu Oct 16, 2025 2:09 pm
by Dirtcrusher
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.

Re: Access to private member inside C++ wrapper

Posted: Sun Dec 28, 2025 9:19 am
by Giovanni
Hi,

Fixed in repository, thanks.

Giovanni