[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Why named structs and unions? C11 supports anonymous structs and uni
Re: Why named structs and unions? C11 supports anonymous structs and unions
Sun, 11 Feb 2018 23:28:03 -0800
Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0
Daniel Colascione wrote:
I feel like being stuck on C99 and not being able to use C11 would be
much rarer. Besides: C99 compilers usually supported anonymous structs and
unions as an extension.
One counterexample is the vendor-supplied compiler on the main server of our
department, which is running Solaris 5.10 (circa 2005). This compiler is Sun C
5.9 (circa 2009). Although more recent versions of this compiler do support
anonymous structs and unions, bug reports are still being filed about the
feature, e.g., https://community.oracle.com/thread/4106986 dated December 2017.
So I would say it's still a bit dicey in more-recent versions.
If it were really important to require this C11 feature I suppose we could forge
ahead and do it and tell laggards to upgrade their compilers or use GCC. But my
impression is that the feature is mostly just a nicety, at least for Emacs.