How to understand non-trivial declarations in C. (right-left rule)
ieng9.ucsd.edu
ieng9.ucsd.edu
First, symbols. Read
* as "pointer to" - always on the left side
[] as "array of" - always on the right side
() as "function returning" - always on the right side
If all of these type operators were on the right side, there would be no need for such a guide. Parenthesis would never be necessary for type declarations, and they could be read in one direction.It's unclear why C authors chose to have both prefix and postfix type operators.
Similarly, the value-level dereference operator could be post-fix, avoiding the need for (->), and making it much easier to dereference and subscript array pointers. That would make it feasible to pass arrays by pointer-to-array, allowing to feasibly pass them by value and have simpler and more consistent language semantics.
Although Apple's changes are released under the GPL, since Apple is no longer doing copyright assignment back to the GNU for it's fork of the GCC it maintains (it doesn't have a procedure in place to do it anymore according the LLVM guys), the changes will have to reimplemented again by someone that can assign copyright to the FSF/GNU or the FSF/GNU guys will have to make an exception to their rules to accept the code (which they will probably never do).
However, blocks are available IIRC to Clang should work under any Linux distro that has made the switch.