C++ Logo

sg12

Advanced search

Re: [isocpp-sg12] [isocpp-core] UB and IFNDR Annex available in my fork of the draft

From: Herb Sutter <herb.sutter_at_[hidden]>
Date: Wed, 2 Apr 2025 14:57:07 -0700
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
<https://isocpp.org/files/papers/P3656R1.pdf> (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

 <https://eel.is/c++draft/basic.life#7.1> (7.1) - the pointer is used as the
operand of a <https://eel.is/c++draft/expr.delete#nt:delete-expression>
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_at_[hidden]> On Behalf Of Yaghmour, Shafik
via

> Core

> Sent: Wednesday, April 2, 2025 2:22 PM

> To: sg12_at_[hidden]

> Cc: Yaghmour, Shafik <shafik.yaghmour_at_[hidden]>; core_at_[hidden];

> ext_at_[hidden]

> 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>
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> 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

> <mailto:Core_at_[hidden]> Core_at_[hidden]

> Subscription: <https://lists.isocpp.org/mailman/listinfo.cgi/core>
https://lists.isocpp.org/mailman/listinfo.cgi/core

> Link to this post: <http://lists.isocpp.org/core/2025/04/17809.php>
http://lists.isocpp.org/core/2025/04/17809.php


Received on 2025-04-02 21:57:09