CodyIT to Linux@lemmy.ml · 4 months agoThe Linux Kernel Looks To "Bite The Bullet" In Enabling Microsoft C Extensionswww.phoronix.comexternal-linkmessage-square14linkfedilinkarrow-up150arrow-down115cross-posted to: [email protected][email protected]linux
arrow-up135arrow-down1external-linkThe Linux Kernel Looks To "Bite The Bullet" In Enabling Microsoft C Extensionswww.phoronix.comCodyIT to Linux@lemmy.ml · 4 months agomessage-square14linkfedilinkcross-posted to: [email protected][email protected]linux
minus-squaremina86@lemmy.wtflinkfedilinkEnglisharrow-up13·4 months agoTag is what goes after the struct keyword to allow referring to the struct type. Structs don’t have to have a tag. Name is what field are called. Adapting Obin’s example: struct foo { int baz; }; struct bar { struct foo qux; }; struct bar data; data.qux.baz = 0; foo and bar are tags for struct foo and struct bar types respectively; baz and qux are field names; and data is a variable name.
Tag is what goes after the
structkeyword to allow referring to the struct type. Structs don’t have to have a tag. Name is what field are called. Adapting Obin’s example:struct foo { int baz; }; struct bar { struct foo qux; }; struct bar data; data.qux.baz = 0;fooandbarare tags forstruct fooandstruct bartypes respectively;bazandquxare field names; anddatais a variable name.