CodyIT@programming.dev to Linux@lemmy.ml · 2 months agoThe Linux Kernel Looks To "Bite The Bullet" In Enabling Microsoft C Extensionswww.phoronix.comexternal-linkmessage-square14fedilinkarrow-up150arrow-down116
arrow-up134arrow-down1external-linkThe Linux Kernel Looks To "Bite The Bullet" In Enabling Microsoft C Extensionswww.phoronix.comCodyIT@programming.dev to Linux@lemmy.ml · 2 months agomessage-square14fedilink
minus-squaremina86@lemmy.wtflinkfedilinkEnglisharrow-up8·edit-22 months agoMinor correction: Unnamed structs and unions (so your second example) are not part of C. They are GNU extensions.
minus-squareObin@feddit.orglinkfedilinkarrow-up4·edit-22 months agoUnless I’m misunderstanding something, I’m pretty sure they’ve been standardized in C11. Also mentioned here.
minus-squareMinekPo1 [it/she]@lemmygrad.mllinkfedilinkarrow-up3·edit-22 months ago“ANSI C” by Kernighan and Ritchie disagrees , including that syntax (note : retranslation from Polish as that’s the language my copy is in) : A8.3 […] struct-union-specifier: , union-struct identifier ₒₚₜ { compound-declaration-list } , union-struct identifier […] Specifiers of structures or unions with [a compound declaration] list, but with no label [identifier], creates a unique type; it may only be referred to in the declaration in which it is part.
minus-squaremina86@lemmy.wtflinkfedilinkEnglisharrow-up1·2 months agoYes, but I was talking about field name, not struct tag. And up to C99 my comment was correct.
Minor correction: Unnamed structs and unions (so your second example) are not part of C. They are GNU extensions.Unless I’m misunderstanding something, I’m pretty sure they’ve been standardized in C11. Also mentioned here.
You appear to be correct.
“ANSI C” by Kernighan and Ritchie disagrees , including that syntax (note : retranslation from Polish as that’s the language my copy is in) :
Yes, but I was talking about field name, not struct tag. And up to C99 my comment was correct.