Re: z/OS enum size pitfall

2017-08-22 Thread Ben Pfaff
On Tue, Aug 22, 2017 at 10:09:22PM -0400, Daniel Richard G. wrote: > On Tue, 2017 Aug 22 15:01-0700, Ben Pfaff wrote: > > > > I don't know what XLC conforms to. > > > > C11 has the same text in 6.7.2.2p4. The specification for enums has > > not changed significantly since C89. > > > > Paul Eggert

Re: z/OS enum size pitfall

2017-08-22 Thread Daniel Richard G.
On Tue, 2017 Aug 22 15:01-0700, Ben Pfaff wrote: > > I don't know what XLC conforms to. > > C11 has the same text in 6.7.2.2p4. The specification for enums has > not changed significantly since C89. > > Paul Eggert already explained the distinction between enumeration > constants and enumeration

Re: z/OS enum size pitfall

2017-08-22 Thread Ben Pfaff
On Tue, Aug 22, 2017 at 10:43:07PM +0200, Tim Rühsen wrote: > On Dienstag, 22. August 2017 13:25:55 CEST Ben Pfaff wrote: > > On Tue, Aug 22, 2017 at 04:13:54PM -0400, Daniel Richard G. wrote: > > > What happens is that BILLION is implicitly typed as an unsigned int, > > > rather than an int. If yo

Re: z/OS enum size pitfall

2017-08-22 Thread Paul Eggert
On 08/22/2017 01:13 PM, Daniel Richard G. wrote: I have been in contact with IBM about this, originally reporting the issue as a compiler bug. However, they responded that the compiler behavior is conformant to the C standard and that they are less concerned with matching the behavior of other sy

Re: z/OS enum size pitfall

2017-08-22 Thread Tim Rühsen
On Dienstag, 22. August 2017 13:25:55 CEST Ben Pfaff wrote: > On Tue, Aug 22, 2017 at 04:13:54PM -0400, Daniel Richard G. wrote: > > Hello list, > > > > I'm writing in to report a bizarre issue with the IBM z/OS XLC compiler > > that is currently causing one gnulib test to fail (test-timespec), an

Re: z/OS enum size pitfall

2017-08-22 Thread Ben Pfaff
On Tue, Aug 22, 2017 at 04:13:54PM -0400, Daniel Richard G. wrote: > Hello list, > > I'm writing in to report a bizarre issue with the IBM z/OS XLC compiler > that is currently causing one gnulib test to fail (test-timespec), and > may present an issue for application code simply because no other

z/OS enum size pitfall

2017-08-22 Thread Daniel Richard G.
Hello list, I'm writing in to report a bizarre issue with the IBM z/OS XLC compiler that is currently causing one gnulib test to fail (test-timespec), and may present an issue for application code simply because no other compiler does things this way. My hope is to have gnulib integrate a workarou