52 ms·
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 m
by int_19h 4y ago
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.
- tristan957 4y agoIf you have a null check on the pointer in the body, GCC will elide it.
- eMSF 4y agoWonder no more: at least clang does, since around v3.5. https://godbolt.org/z/jEq5xbMna https://godbolt.org/z/jEq5xbMna