Re: [gtk-list] A small patch for GTK+ 1.3.0 CVS and AIX 4.3




> 1) The IBM 'xlc' family of compilers doesn't like a trailing comma
> after the last member of an 'enum'.  This patch should be OK for
> other compilers.

I got bitten by this and went off to check K&RII.  Lo, their grammar
in the appendix doesn't allow it although it does explicitly allow
a trailing comma on an array initialiser.

    int ok[] = {
        1,
        2,
        3,
    };

    enum bad {
        THIS,
        FAILS,
    };

A bit of a pain for automatically generated source which I gather is
the reason the first is allowed.


Ralph.



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]