News for hackers. Stuff that matters.
Re:Building a C Compiler Type System – Part 1: The Formidabl... by jotux on Thursday July 07, 2016 @03:09PM (#12051466)

    void (*fn)(int*) // fn takes a pointer-to-an-int and gives you void
Wouldn't this suggest that the type this function takes is `int*`?

I've always thought the pointer declaration syntax in C was just an oversight and I get around it's ambitiousness by always declaring variables on their own line.

Re:Building a C Compiler Type System – Part 1: The Formidabl... by bluetomcat on Thursday July 07, 2016 @04:06PM (#12051779)
As the article says, int-star is an "abstract declarator". An abstract declarator simply omits the name, otherwise it is the same. Therefore, the "canonic" way to write that declaration would be:

    void (*fn)(int *);