Repository navigation
Regression fix: Allow to include caml/custom.h in C++ code - #13895
Merged
Merged
Conversation
Member
|
Your proposed fix removes the variable instead of formulating it in a C++-compatible way. I'm not convinced that this is the right fix. The discussions in #13777 suggest that |
Contributor
|
Sorry that my work on the previous PR has stalled.
Yes, it would. This commit could be cherry-picked: 6537fe8. |
_Atomic is standard C11 but is not standard C++ (although sometimes
available as a compiler extension). Use atomic_uintnat from our
camlatomic.h.
In file included from all-includes.h:6:
/Users/antonin/Tarides/ocaml/trunk/runtime/caml/custom.h:54:12: error: '_Atomic' does not name a type; did you mean 'Atom'?
54 | CAMLextern _Atomic uintnat caml_custom_major_ratio;
| ^~~~~~~
| Atom
kit-ty-kate
force-pushed
the
custom_h-cpp
branch
from
March 25, 2025 13:37
ac9d4ba to
92e54c4
Compare
Member
Author
|
Done |
MisterDA
approved these changes
Mar 25, 2025
gasche
approved these changes
Mar 25, 2025
Member
|
Merged, thank you both! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This is a regression fix for trunk compared to 5.3.0.
Using trunk, including
caml/custom.hwill result in the following error when using g++:Related to #13777