Repository navigation
Conversation
Contributor
There was a problem hiding this comment.
🟢 Approval recommended
The documentation-only changes leave two minor precision corrections, with no blocking issues.
2 open issues
What changed in this PR
Expands Chapter 12’s C/C++ interoperability guidance through C++26 while preserving the C++20 build baseline.
Changes:
- Explains ABI boundaries, ownership, callbacks, and language differences.
- Adds guidance on modules, reflection, and production interfaces.
- Numbers body sections for chapter-validator compatibility.
| File | Description |
|---|---|
01_low_level/12_c_cpp/README.md |
Expands interoperability explanations and updates chapter structure. |
Review effort: Balanced
|
|
||
| ### Function pointers and callbacks need a deliberate lifetime protocol | ||
|
|
||
| A C callback typically consists of a function pointer plus a context pointer. A capturing C++ lambda cannot implicitly become a C function pointer; a noncapturing lambda can convert to a pointer to function with appropriate language linkage behavior as specified, but binary interfaces still require a compatible function-pointer contract. |
|
|
||
| ### C99 VLAs and compound literals are not ordinary C++ syntax | ||
|
|
||
| A C variable-length array has runtime size and stack-storage semantics; standard C++ does not provide C99 VLAs. Some GCC and Clang C++ modes accept them as extensions, which can accidentally turn portable-looking code into vendor-specific code. |
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.

Reviewed the six mixed C/C++ example groups and expanded language-vs-ABI differences, C linkage, callbacks, allocation, structs, type qualifiers, C99 VLAs/restrict, C11 atomics, C23 vs C++23, C++20 modules and C++26 reflection. Updated numbered Markdown chapter structure for chapter validator in PR #15. README-only, C++20 build baseline unchanged.