Skip to content

[diff.expr] Strike line in example that is UB in C23 - #9249

Open
jensmaurer wants to merge 1 commit into
cplusplus:mainfrom
jensmaurer:c73
Open

[diff.expr] Strike line in example that is UB in C23#9249
jensmaurer wants to merge 1 commit into
cplusplus:mainfrom
jensmaurer:c73

Conversation

@jensmaurer

Copy link
Copy Markdown
Member

In C23, "p + 0" is undefined behavior if p is a nullptr, regardless of whether the result is dereferenced.

Fixes #9248

In C23, "p + 0" is undefined behavior if p is a nullptr,
regardless of whether the result is dereferenced.
@jensmaurer

Copy link
Copy Markdown
Member Author

The two other lines in the example are sufficient exposition for the C incompatibility we wish to highlight.

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.

[diff.expr] Paragraph added by CWG2875 is not correct for C23

2 participants