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

[2025-02 CWG Motion 4] P1494R5 Partial program correctness #7681

Merged
merged 1 commit into from
Feb 24, 2025

Conversation

notadragon
Copy link
Contributor

Fixes: #7654
Also fixes: cplusplus/papers#376

It's my first paper PR, so please be gentle :)

@jensmaurer jensmaurer added this to the post-2025-02 milestone Feb 16, 2025
@@ -670,7 +671,7 @@
\tcode{static_cast<underlying_type_t<T>>(value)}.
\end{itemdescr}

\rSec2[utility.unreachable]{Function \tcode{unreachable}}
\rSec2[utility.undefined]{Undefined behavior}
Copy link
Member

Choose a reason for hiding this comment

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

This needs a \movedxref entry in xrefdelta.tex

Copy link
Contributor Author

Choose a reason for hiding this comment

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

xrefprev seems to be missing utility.unreachable. I'll add it, but it also seems to be missing about 500 other stable names from N4950 that are not in xrefprev. would you like me to add those? (It's unclear to me what the intent of the contents of xrefprev is --- whether it should be removed names, or just all names that were previously in use -- either way that is not what it is).

Copy link
Member

Choose a reason for hiding this comment

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

xrefprev is supposed to be the list of xrefs in C++17, so that we get warnings from our tooling when a label vanishes without mention in xrefdelta.tex. Maybe that went wrong when I added that; Alisdair has a patch in a nearby pull request, too.

So, until we fix xrefprev for real, we need to manually add the old label.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

ok. shouldn't it be the list of stable names from any previously published standard? Or from C++17 to C++23 inclusive? I could grab that pretty easily if it helps (I already extracted it from C++23), but for this PR I have added utility.uncreachable manually to xrefprev.

Copy link
Member

Choose a reason for hiding this comment

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

The problem is we've added the label since C++17, and now we're renaming it. So, it's technically not correct that it was a label in C++17, which xrefprev attempts to represent.

The once-off fix feels reasonable for now.

Copy link
Contributor

Choose a reason for hiding this comment

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

I merged Alisdair's changes, but I don't think it touches on this. But we can follow this up later I suppose?

Copy link
Contributor

Choose a reason for hiding this comment

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

My understanding of @StephanTLavavej's request is that we don't just want the diff of the stable labels relative to one arbitrary point in the past, but rather, we want a full history of things that have happened, so that if you've been working with any one version of the document and are switching to a newer one, you can look up what happened to the label you had been working with.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I definitely think that'd be way more useful than just "here's things that were in C++17 that might have moved". It might be even more useful to have the index list when the name was moved (i.e, "utility.unreachable (moved in C++26, see utility.undefined)"

@notadragon notadragon changed the title P1494R5 Partial program correctness [2025-02 CW Motion 4] P1494R5 Partial program correctness Feb 18, 2025
@notadragon notadragon changed the title [2025-02 CW Motion 4] P1494R5 Partial program correctness [2025-02 CWG Motion 4] P1494R5 Partial program correctness Feb 18, 2025
@notadragon notadragon force-pushed the motions-2025-02-cwg-4 branch from 60ccef5 to 8196161 Compare February 18, 2025 16:31
@tkoeppe tkoeppe force-pushed the motions-2025-02-cwg-4 branch from 8196161 to 9d85c93 Compare February 24, 2025 13:44
@tkoeppe tkoeppe force-pushed the motions-2025-02-cwg-4 branch from 9d85c93 to debf098 Compare February 24, 2025 14:54
@tkoeppe tkoeppe dismissed jensmaurer’s stale review February 24, 2025 14:57

We can follow up later.

@tkoeppe tkoeppe self-requested a review February 24, 2025 14:57
@tkoeppe tkoeppe merged commit 458b16a into cplusplus:main Feb 24, 2025
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[2025-02 CWG Motion 4] P1494R5 Partial program correctness P1494 R4 Partial program correctness
3 participants