Skip to content

Requirements on the target platform C implementation #46

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

Closed
wants to merge 14 commits into from
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
add unresolved questions about targets without conforming C implement…
…ations
  • Loading branch information
gnzlbg committed Nov 12, 2018
commit 612f003549887a4d8b005638b0889a7d00bb4afd
8 changes: 8 additions & 0 deletions reference/src/representation/c_abi.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,4 +71,12 @@ are opened:
does not convey any information about the exact representation of its
niche, that is, it is different from `NonZero`.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The documentation for NonNull says "*mut T but non-zero and covariant" (emphasis mine). Later on the documentation says "non-null"; i.e."non-zero" and "non-null" are used interchangeably.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The docs might need fixing.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The docs might need fixing.

I agree. However, somebody may have already read the documentation and made the assumption that NULL == 0 based on them, and may then be relying on that, so it should be announced loudly if that change is made. If it isn't too late, it would be good to do it at the same time Rust 2018 edition ships and maybe consider it part of Rust 2018.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is unclear at this point what we are going to require about the niches of &T, that probably will be part of the discussions about "validity", which are not taking place yet (hence why this is an unresolved question).


* **targets "without C"**:

* What should we do about targets whose C implementation is not standard
conforming? Do we require full standard conformance? Or only conformance of
some specific aspects that are required for FFI ?

* What should we do about targets that do not have a C implementation at all?

[latest_c_std]: http://www.open-std.org/jtc1/sc22/wg14/www/abq/c17_updated_proposed_fdis.pdf