News for hackers. Stuff that matters.
Re:Using Zig's translate-C to understand weird C code by foxfluff on Wednesday November 03, 2021 @10:12AM (#29094847)
Yes they do something. They are used to override precedence, just as you would in a math expression. Array indexing has higher precedence than pointer dereferencing, and declarations follow the same precedence that you have in expressions.

   int **p[123]; // p is array(123) of pointer to pointer to int

   int *(*p)[123]; // p is a pointer to array(123) of pointer to int
Sometimes people find casts confusing because there is no identifier inside. But you can easily read it if you know where the identifier would be in an equivalent declaration.

Precedence is usually documented in a man page called operator. http://man.openbsd.org/operator

There are no comments on this comment yet.