(Apologies for the delayed response) On Wed, 2019 Nov 6 14:32-05:00, Paul Eggert wrote: > > 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."
Ah, good find. I suspected that the compiler is in a transitional period w.r.t. C11. > 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. The C99 mode (-qlanglvl=extc99) works without issue. That's what I've been using for all my testing. > 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. Hmm, I see what you mean. FWIW, the "checking for working stdalign.h" check does end with "no". > > 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. I do get the feeling that the C11 brokenness of this compiler is not worth working around. IBM is normally a stickler for standards, which makes this an unusual scenario, but I think it's a good enough solution for users who are bitten by this to press IBM to get it right. I certainly plan on doing so. --Daniel -- Daniel Richard G. || sk...@iskunk.org My ASCII-art .sig got a bad case of Times New Roman.