News for hackers. Stuff that matters.
Re:Writing a C Compiler, Part 1 by bluetomcat on Friday December 01, 2017 @05:20AM (#15823029)
Yes, stuff like the `a * b` ambiguity (declaration or expression?), typedef being just another storage class specifier (thus, `static int var` and `typedef int mytype` being the exact same syntactic forms), having complex rules for implicit promotions and conversions, the mess between signed and unsigned.

All of these design warts of C show up clearly when attempting to write a compiler and are not very obvious to most users of the language.

Re:Writing a C Compiler, Part 1 by pjmlp on Friday December 01, 2017 @06:58AM (#15823310)
Function pointer declarations is also a fun one, specially in a function declaration as return value and parameters.
Re:Writing a C Compiler, Part 1 by userbinator on Friday December 01, 2017 @06:58AM (#15823313)
Typedefs are a little trickier to handle (particularly the "when do they actually take effect" part), but "the `a * b` ambiguity" is not hard, because if 'a' is a typedef or qualifier/specifier or basically anything that a declaration can start with, it's a declaration.

C++, on the other hand, is definitely far harder to parse, especially if you include things like templates.