Hacker News
new
|
past
|
comments
|
ask
|
show
|
jobs
|
submit
login
richardwhiuk
on Sept 14, 2020
|
parent
|
context
|
favorite
| on:
Massacring C Pointers (2018)
IIRC, both of those are undefined.
edflsafoiewq
on Sept 21, 2020
[–]
&a[3] is allowed, it's a one-past-the-end-of-the-array pointer. &a[4] would be UB (if it were evaluated).
sizeof(a[3]) is not evaluating a[3], so it also isn't UB.
Guidelines
|
FAQ
|
Lists
|
API
|
Security
|
Legal
|
Apply to YC
|
Contact
Search: