The comment to this answer got me wondering. I\'ve always thought that C was a proper subset of C++, that is, any valid C code is valid C++ code by extension. Am I wrong a
typedef struct {
int a, b, c;
} st;
st s = {
.a = 1,
.b = 2,
};
This is valid C code which does not compile in most C++ compilers. It is not part of the C++ spec as far as I know. However, some C++ compilers are "liberal" with certain parts of the language and allow things they shouldn't, just as a lot miss out on a few nuances that are in the spec but almost never used.