[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
Mon, 12 Feb 2018 12:22:53 -0800
Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.5.0
On 02/11/2018 11:28 PM, Paul Eggert wrote:
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
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.
If there would be real people adversely impacted by a C11 requirement,
we can hold off a little while. The union stuff is merely ugly; it's not
a severe problem. I'd definitely like to move to C11 and anonymous inner
structures eventually though.