[2026-06 CWG Motion 2] P3596R3 Undefined Behavior and IFNDR Annexes#9107
[2026-06 CWG Motion 2] P3596R3 Undefined Behavior and IFNDR Annexes#9107notadragon wants to merge 3 commits into
Conversation
| \end{codeblock} | ||
| \end{example} | ||
|
|
||
| \ubdescription{conv.fpint.float.not.represented} |
There was a problem hiding this comment.
Super minor but I think this one should be swapped w/ conv.fpint.int.not.represented b/c in 7.3.11 we have E.3.8 first and then E.3.7 but again super minor nit.
|
|
||
| \pnum | ||
| Evaluating a \keyword{dynamic_cast} on a reference that | ||
| denotes an object (of polymorphic type) of the wrong type or an object |
There was a problem hiding this comment.
| denotes an object (of polymorphic type) of the wrong type or an object | |
| denotes an object (of polymorphic type) of the similar type or an object |
I am not sure but looking at the core wording, I think that is more correct?
There was a problem hiding this comment.
"of the similar type" is wrong, similar type would be fine. "wrong" type could be interpreted broadly as "any type that is wrong for doing this" but we can be more precise and say "of a type that is not similar" . I will change to that.
| \pnum | ||
| \begin{example} | ||
| \begin{codeblock} | ||
| struct S { |
There was a problem hiding this comment.
You don't indicate the UB in the example and why didn't you use the simpler example from 7.6.6? Maybe this was my original example?
There was a problem hiding this comment.
i will compact this example slightly and add a comment about the UB. Not sure who the example dates back to (probably you). I would rather not rewrite examples entirely in this phase so will leave switching to clearer/simpler examples for followup efforts.
| \ubdescription{expr.assign.overlap} | ||
|
|
||
| \pnum | ||
| Overlap in the storage between the source and destination may result in undefined behavior. |
| \ubdescription{class.base.init.mem.fun} | ||
|
|
||
| \pnum | ||
| It is undefined behavior to call a member function before all the \grammarterm{mem-initializer}s for base classes have completed. |
There was a problem hiding this comment.
It looks like there are two contracts cases added that we are missing. This feels minor and we can add afterwards too.
There was a problem hiding this comment.
I am prepping a PR with new/missing entries and any entries that need major updating after all of the Brno motions land, I will make note to include this in that PR (and the paper that will be generated from that PR). I think it should wait until after all of the Brno motions land.
|
@notadragon, please squash all commits into the first one; we don't need the details of the genesis preserved for posterity. |
|
@notadragon, do we have "ubx" as part of a visible label in the Annex headings now? We shouldn't; those visible labels should be "ub:something". (Similarly with ifndrx, if any). |
shafik
left a comment
There was a problem hiding this comment.
Finished reviewing IFNDR annex. Really minor comments. I think we are in good shape here.
| \ifndrdescription{module.unit.named.module.no.partition} | ||
|
|
||
| \pnum | ||
| Having multiple primary module interface units |
There was a problem hiding this comment.
I am not sure this description matches what the wording says but I may just not be reading it correctly.
There was a problem hiding this comment.
The wording defines "primary module interface unit" and says, effectively, "A named module shall contain one module interface unit that meets that definition, no diagnostic required". As far as I can tell that's what the annex entry is saying as well, though i'm happy to adjust if it's wrong or there's clearer wording. Leaving this as-is for now.
No, I swapped which label is "ub:" and which is "ubx:", and I also made the "stable names" shown in the annex start with "ub:" and ifndr:. Here's some screenshots of my locally built copy of the standard for review:
|
c26a110 to
3e05f52
Compare
|
@jensmaurer @shafik I've addressed, I believe, all of your comments. |
Thank you so much for all this work to get the annexes landed in the draft! I am happy with direction in your replies. |


Fixes #9069
Also fixes cplusplus/papers#2623
This is from the branch from which the paper was generated, with a small number of editorial changes already made: