Hi Jens, Shafik, Herb, and others,

Thank you very much for all this work!

I am in fact also working in this area right now: I have been working together with Joshua Berne on a revision of P3100 for Sofia. As part of this work, I *also* went through the entire C++ working paper and enumerated all instances of UB mentioned there. However, I started from scratch rather than basing my work on Shafik's. So we now have our own list of "all instances of UB called out in the C++ Standard".

I think we should have just one such list, so we should merge them. I just went through Jens' PR, reviewed everything you have there, and cross-correlated every \ubref you added in that PR with my own list of UB.

As I was doing that, I noticed that there is a number of instances of UB that is present in my list but absent from your PR. There are also a few other mistakes in your PR and I further have some suggestions on some of the entries in your list. I will type out all this feedback in this email below so you can act on it. Moreover, if you like, Josh and/or I can prepare a PR against your branch that fixes all of the feedback items I am listing below in this email. Please let me know if you think that's a good way forward – or if not, please let me know what we should do instead. We want to help!

One more thing: we did not look at IFNDR as it's not in scope for what Josh and I are currently working on, so this email is just about UB, not about IFNDR.

With all that being said, here is my feedback.

1. The following instances of UB seem to be entirely missing from your PR, i.e., no \ubdef was added to them (unless I missed something or there is a reason why you did not include those specific items – in this case please let me know!). Here is the list of all instances of UB missing from your PR, in the order in which they appear in the C++ working paper (I did not assign any Shafik-style \ubdef-identifiers to them, I just list in which subclause/paragraph they appear):


2. The following items have a \ubdef in your PR, but I don't think they should have one. I don't think they are instances of UB (here I am using *your* \ubdef identifiers to refer to them) and I suggest to remove \ubdef from them:


3. In the following places, you seem to have mixed up different instances of UB and assigned the wrong \ubdef:


4. In the following places, you add a single \ubdef, however the paragraph in question actually lists multiple instances of UB which are related but distinct. In my list they are listed as separate cases. You might want to consider doing the same:


5. In the following places, there isn't something broken per se, but I was surprised by your choice for the \ubdef identifier, may I suggest to pick a better one:


That's it for now. I hope this feedback is useful. Any feedback on my feedback would be greatly appreciated. And again, if you would like a PR (on top of yours) that fixes all of the above, please let me know.

Thanks,
Timur


On 11 Apr 2025, at 18:10, Jens Maurer via Core <core@lists.isocpp.org> wrote:



On 04/04/2025 23.41, Herb Sutter wrote:
*CWG and Shafik*, direction please re just finding all the places to annotate: As we gear up to enlist more people to help gather the draft annotations (since there's a lot of UB to tag), would you prefer we do it in Shafik's branch? Perhaps as PRs? Shafik, is your branch up to date or do we need to keep it up to date? Just trying to determine where we want to collaborate together to start expanding the list.

So, with Shafik's consent, I've made a branch / pull request for the Annex here,
based on Shafik's work:

https://github.com/cplusplus/draft/pull/7826

I've fixed various LaTeX issues that prevented a clean CI build.

Any improvements should be pull requests against the "ub-ifndr" branch and will
amend the pull request above.

*CWG*, direction please re then actually reviewing batches of those proposed annotations as they get ready to be proposed for the IS draft: Procedurally, for just the annotations of existing UB/IF-NDR (excluding any future 'what to do about each case' changes which would be EWG papers), how does CWG want to see and review batches of annotation additions -- presented as Core wording P papers? as opposed to, say, PRs (which, as was pointed out in EWG, have the drawback of not being available in all countries)?

Shafik's work seems to be pretty comprehensive.  There is still work to do
as outlined in P3075, in particular:

- A summary of the issue in the style of a note
(We currently have lots of quotes of the normative rule
in the Annex.)

- No duplication of normative requirements i.e. verbs “shall”, “may”, “might” and “could” are
forbidden but “can” and “could” are allowed


I'd like to have a round of improvements to the existing Annex pull request
without CWG review, where we also distill a wiki page with rules of
engagement.  We might also want to change some of the presentation.

When we (Herb, Gasper, editors, who else?) are happy with what we have, we'll
have a CWG review and then merge to the main body.  We'll probably have a
P paper with a "current" rendition of the Annex (just cut the pages from
the standard PDF) at that point and get plenary approval on the approach;
I expect further updates to be at the level of "feature-test macros", which
also are quasi-editorial and don't need plenary approval on the individual level.

Given the completeness we already have, I'm confident we can claim we're
complete once that P paper gets approved / merged; any residue are "bugs"
that we can fix in the ordinary course of business.

Jens

_______________________________________________
Core mailing list
Core@lists.isocpp.org
Subscription: https://lists.isocpp.org/mailman/listinfo.cgi/core
Link to this post: http://lists.isocpp.org/core/2025/04/17843.php