1. 9

  2. 3

    A lot of this is for C11 compatibility (where C11 largely standardised a fairly old GNU extension as-is). It has some interesting interactions with other features.

    The most annoying part that I’ve encountered is that you can’t use the C-style array initialisation for initialiser lists. This is useful when your array indexes are an enum and you want to get a compile failure if you miss one or put them in the wrong order, something like (in C):

    struct Foo *handlers[] = { [Thing] = &thingHandler, [OtherThing] = &otherThingHandler, [LastThing] = NULL };

    You can’t do this with C++.

    1. 1

      Not to say C99