bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: IBM z/OS compatibility issues


From: Paul Eggert
Subject: Re: IBM z/OS compatibility issues
Date: Wed, 6 Nov 2019 11:32:26 -0800
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.1.1

On 11/6/19 6:57 AM, Daniel Richard G. wrote:

Confirmed that the compiler sets __STDC_VERSION__ == 201112 without
actually supporting that level.

IBM's user guide for the compiler <https://www-01.ibm.com/servers/resourcelink/svc00100.nsf/pages/zOSV2R3sc147307/$file/cbcux01_v2r3.pdf>, dated 2019-06-26, states the following on page 153:

"Until IBM's implementation of all the features of the C11 standard is complete,... IBM makes no attempt to maintain compatibility ... with earlier releases of IBM's implementation of the new features of the C11 standard and therefore they should not be relied on as a stable programming interface."

With this in mind, perhaps it'd be better to use that compiler in its C99 mode, to avoid having 'configure' attempt to use C11 features before IBM gets its C11 act together. That should be good enough for now, and we can worry about getting Gnulib to work with IBM's C11 support once that support is ready.

Note that this in fact doesn't cause a
problem for Gnulib, because _Alignas() is part of its "checking for $CC
option to enable C11 features" check, thereby causing it to fail with
"unsupported".
Although 'configure' does the right thing and says that _Alignas is unsupported, 'make' then goes ahead and builds a stdalign.h that assumes that _Alignas works (because the compiler defines __STDC_VERSION__ to be 201112), and the generated stdalign.h therefore defines alignas and __alignas_is_defined, which is wrong.

What leaves me scratching my head is that in
/usr/include/stdalign.h, I see the following:

     #if defined(__C1X)
       #define alignas _Alignas
       #define alignof _Alignof
       #define __alignas_is_defined 1
       #define __alignof_is_defined 1
     #endif

So /usr/include/stdalign.h has the same bug as the Gnulib stdalign.h replacement, in that it also defines alignas and __alignas_is_defined even though _Alignas does not work. Presumably /usr/include/stdalign.h is relying on the statement in the manual that C11 support is still unstable and can't be relied upon.

So it sounds like we should let this particular sleeping dog lie, as far as Gnulib is concerned.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]