Better HN
top
new
best
ask
show
jobs
Log in
Sign up
Better HN
Comment
by
int_19h
· 4y ago · 0 comments
Note that:
void foo(int p[static 1]);
is effectively a standard way to declare that p must be non-null pointer. I always wondered if any compiler actually makes use of this for optimization purposes.
Comments
[–]
eMSF
4y ago
Wonder no more: at least clang does, since around v3.5.
https://godbolt.org/z/jEq5xbMna
[–]
tristan957
4y ago
If you have a null check on the pointer in the body, GCC will elide it.