CodyIT@programming.dev to Linux@lemmy.ml · 7 months agoThe Linux Kernel Looks To "Bite The Bullet" In Enabling Microsoft C Extensionswww.phoronix.comexternal-linkmessage-square8fedilinkarrow-up152cross-posted to: linux@programming.dev
arrow-up152external-linkThe Linux Kernel Looks To "Bite The Bullet" In Enabling Microsoft C Extensionswww.phoronix.comCodyIT@programming.dev to Linux@lemmy.ml · 7 months agomessage-square8fedilinkcross-posted to: linux@programming.dev
minus-squareObin@feddit.orglinkfedilinkarrow-up20·edit-27 months agoYou mean ‘unnamed’ is what’s confusing you? Normally you can do anonymous struct/union members or struct struct/union members that are tagged structs but not anonymous. I.e. in standard C you’d have to do either: struct foo { int baz; }; struct bar { struct foo foo; }; ... struct bar data; data.foo.baz = 0; or: struct bar { struct { int baz; } foo; }; ... struct bar data; data.baz = 0; but to do the following, you’d need the extension: struct foo { int baz; }; struct bar { struct foo; }; ... struct bar data; data.baz = 0;
minus-squareObin@feddit.orglinkfedilinkarrow-up3·edit-27 months agoUnless I’m misunderstanding something, I’m pretty sure they’ve been standardized in C11. Also mentioned here.
deleted by creator
Untagged?
You mean ‘unnamed’ is what’s confusing you?
Normally you can do anonymous struct/union members or struct struct/union members that are tagged structs but not anonymous.
I.e. in standard C you’d have to do either:
struct foo { int baz; }; struct bar { struct foo foo; }; ... struct bar data; data.foo.baz = 0;or:
struct bar { struct { int baz; } foo; }; ... struct bar data; data.baz = 0;but to do the following, you’d need the extension:
struct foo { int baz; }; struct bar { struct foo; }; ... struct bar data; data.baz = 0;deleted by creator
Unless I’m misunderstanding something, I’m pretty sure they’ve been standardized in C11. Also mentioned here.
deleted by creator
deleted by creator