This post has been de-listed
It is no longer included in search results and normal feeds (front page, hot posts, subreddit posts, etc). It remains visible only via the author's post history.
I'm trying to figure out if the following is UB: https://godbolt.org/z/4xoK9hWr4
My curiosity stems from reading about the "debian openssl fiasco", which if I understand it correctly, started because of a similar pattern.
So far I've found this statement
If the lvalue designates an object of automatic storage duration that could have been declared with the register storage class (never had its address taken), and that object is uninitialized (not declared with an initializer and no assignment to it has been performed prior to use), the behavior is undefined.
6.3.2.1p2
which seems to not be it because in this case it could not be register class because we are taking a pointer to it. Annex J says this, but my understanding is it's not normative
The value of an object with automatic storage duration is used while it is indeterminate (6.2.4, 6.7.8, 6.8).
Thanks in advance.
Subreddit
Post Details
- Posted
- 1 year ago
- Reddit URL
- View post on reddit.com
- External URL
- reddit.com/r/C_Programmi...