News for hackers. Stuff that matters.
Re:C/C++ Pointer Declaration Syntax – It makes sense by gsg on Tuesday February 21, 2012 @09:58AM (#3616639)
I've always found it unsurprising that people find typedefs confusing. They're a storage specifier, which allows for some questionable constructs:

    int typedef x;
    typedef what;
    struct { int x; } typedef *x, y;
    enum { x } typedef;
Storage specifiers are pretty weird. This nonsense is allowed at function or parameter list scope, but not file scope:

    void f() { enum { x } register; }
    void f(enum { x } register);
I've never understood why Ritchie designed C's declaration syntax to have so many dumb edge cases.

There are no comments on this comment yet.