void foo(int (*)[12]); void foo(int (*pointer_to_integer_array)[12]) { /* Huh. This actually works. */ } https://cdecl.org/?q=int+foo+%28int+%28*%29%5B12%5D%29%3B …
-
Show this thread
-
Replying to @sortiecat
Yes, I actually use this construct in musl in a couple places.
1 reply 0 retweets 1 like -
Replying to @RichFelker @sortiecat
One nice use is to get a constraint violation if you try to call a function with wrong-size array argument.
1 reply 0 retweets 1 like
Replying to @RichFelker @sortiecat
Idiomatic pointer-to-first-element can't catch that, but pointer-to-whole-array-type can.
0 replies
1 retweet
1 like
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.