I'm sitting around doing IT shit waiting things to download/backup/install/etc and have nothing better to do, so here's an AI-free explanation with code samples:
It's basically just a code style thing. Standard C allows you to declare unnamed structs/unions within other structs/unions. They must be unnamed, so it'd look like this:
struct test {
int a;
struct {
char b;
float c;
};
double d;
};
Which is fine, but the -fms-extensions flag enables you to do the same thing with named structs. For example:
struct test {
int a;
struct test2 {
char b;
float c;
};
double d;
};
without -fms-extensions, the above will compile, but won't do what you might assume. b and c will be members of struct test2, not test. So something like this won't compile:
struct test my_test;
my_test.b = 1; // error: ‘struct test’ has no member named ‘b’
But with the flag, not only does it work, it also lets you do some convenient things like this:
struct test2 {
char b;
float c;
};
struct test {
int a;
struct test2;
double d;
};
//...
struct test my_test;
my_test.b = 1; //OK
That is, you can reuse an existing struct definition, which gives you a nice little tool to organize your code.
Source: https://gcc.gnu.org/onlinedocs/gcc/Unnamed-Fields.html