Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Building with C++ compiler #666

Closed
DenisBiryukov91 opened this issue Sep 16, 2024 · 0 comments · Fixed by #740
Closed

Building with C++ compiler #666

DenisBiryukov91 opened this issue Sep 16, 2024 · 0 comments · Fixed by #740

Comments

@DenisBiryukov91
Copy link
Contributor

Describe the release item

Currently there are issues when building pico with c++ compiler:

  1. All the public api are wrapped in extern "C", while none of the internal code is - which can lead to ub.
  2. We are using compound initializers inside internal code - which are not part of C++ standard (even designated initializers are only supported since C++ 20)

It would be good to address this issues.
The first one can be probably fixed by setting a config variable Z_USING_CPP_COMPILER (or something similar) based on the platform/ compiler info from cmake.
To solve the second point, we would need to correct all uses of compound initializers (we can leave designated initializers if we state that we require at least C++ 20 compliant compiler).

@DenisBiryukov91 DenisBiryukov91 added the release Part of the next release label Sep 16, 2024
@milyin milyin removed the release Part of the next release label Oct 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

2 participants