Thanks, Shafik -- perfect timing! I was about to ask a related question of Jens + Thomas + core + edit, so moving the thread there for my question:
Context: In Hagenberg EWG encouraged a core language UB (and/including IF-NDR) white paper, and in the telecon two weeks ago EWG encouraged following the process and work items in P3656 (R1 updated to reflect EWG’s guidance).
To pursue the first step in P3656R1 section 2.1, the encouraged direction was to put basic UB tags in the IS working paper source.
Shafik’s fork below adds tags such as \ifndriref{tag} and \ubiref{tag}, for example:
- no diagnostic required.
+ no diagnostic required\ifndriref{basic.def.odr.exact.one.def}.
- program has undefined behavior if
+ program has undefined behavior\ubiref{lifetime.outside.pointer} if
These are considered editorial and can be added while still working on C++26.
The Appendix notes that after the EWG telecon I got strong feedback/suggestions (but that was NOT yet presented and approved by EWG) that the tag should include the specific phrase that introduces the UB/IF-NDR (if explicit), and a short description of how it arises?
Jens and Thomas (and everyone), what do you suggest that the LaTeX spelling and format for that UB/IF-NDR tag to be? And should it include a description of the UB/IF-NDR?
Example: Please show how you would like to tag [basic.life]/7, which says in part:
[…] The program has undefined behavior if
(7.1) — the pointer is used as the operand of a delete-expression,
[…]
Shafik has added this edit:
- program has undefined behavior if
+ program has undefined behavior\ubiref{lifetime.outside.pointer} if
What should this example look like in LaTeX?
Goal: To get enough unofficial direction here to write a paper proposing the diff for a initial small set of cases (perhaps a subset of Shafik’s, thanks Shafik!) for EWG to review, and if approved send to CWG for review, just to set out a precedent that we can then follow as we ramp up doing this systematically.
> -----Original Message-----
> From: Core <core-bounces@lists.isocpp.org> On Behalf Of Yaghmour, Shafik via
> Core
> Sent: Wednesday, April 2, 2025 2:22 PM
> To: sg12@lists.isocpp.org
> Cc: Yaghmour, Shafik <shafik.yaghmour@intel.com>; core@lists.isocpp.org;
> ext@lists.isocpp.org
> Subject: [isocpp-core] UB and IFNDR Annex available in my fork of the draft
>
> Hello Folks,
>
> After a hiatus I am back to working on the UB and IFNDR annex. I have
> integrated the UB and IFNDR annex into my fork of the C++ draft standard
> document, which can be found here:
>
> https://github.com/shafik/draft/tree/ub_annex_draft
>
> I know a lot of folks are very eager to see progress on both of the annex but
> there is a significant amount of editing that is needed in order to hit all the
> goals outlined in: https://wg21.link/p3075
>
> Now we have a common draft, interested parties can help to make progress on
> the UB and IFNDR Annex.
>
> Regards
> Shafik
> _______________________________________________
> Core mailing list
> Subscription: https://lists.isocpp.org/mailman/listinfo.cgi/core
> Link to this post: http://lists.isocpp.org/core/2025/04/17809.php