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
Various headers take advantage of the fact that C allows implicit casts of void* to other pointer types, e.g.:
..., void* ptr, ....
struct mine *p = ptr;
However this code is erroneous in C++, causing build errors when these headers are included.
Since Zephyr does support C++ in application code, implicit casts should be replaced by explicit casts in any header that provides API to applications.
The text was updated successfully, but these errors were encountered:
@pabigot Something like this does indeed make sense to fix. But note that C++ support is quite experimental. So classifying it as a bug, is maybe a bit borderline. So I will set it to low.
(note that we cannot be in a situation where somebody adds some experimental support for a new feature, and we end up blocking all progress anywhere else until that feature is mature enough).
Also note that bug reports like this one are problematic, as it is quite unbound, it does not point to anything in particular, and sets the burden of proof of the bug having been fixed in whoever is fixing it.
@aescolar The documentation says nothing about C++ support being "quite experimental" and there are a lot of long-standing bugs related to it, one of which is medium priority, for which we've only just found a viable solution.
I agree the problem is unbound, but I don't see how to focus it. Since we don't have anything that checks conformance on PR submission (not even for things uncrustify can identify) problems will continue to be introduced. Which is why I plan to address this using Coccinelle.
Various headers take advantage of the fact that C allows implicit casts of
void*
to other pointer types, e.g.:..., void* ptr, ....
struct mine *p = ptr;
However this code is erroneous in C++, causing build errors when these headers are included.
Since Zephyr does support C++ in application code, implicit casts should be replaced by explicit casts in any header that provides API to applications.
The text was updated successfully, but these errors were encountered: