Re: Another C compiler shift bug?

2014-05-13 Thread Charles Mills
-by-line relationship with the source code. Charles -Original Message- From: IBM Mainframe Discussion List [mailto:IBM-MAIN@LISTSERV.UA.EDU] On Behalf Of Paul Gilmartin Sent: Thursday, May 08, 2014 4:01 PM To: IBM-MAIN@LISTSERV.UA.EDU Subject: Re: Another C compiler shift bug? On Thu, 8

Re: Another C compiler shift bug?

2014-05-13 Thread Tony Harminc
On 8 May 2014 19:34, Farley, Peter x23353 peter.far...@broadridge.com wrote: ST doesn't accept a 3-modifier expression, that is an artifact of the XL C/C++ assembler listing format. This is really really annoying, and has been for years. The compiler is now quite capable of producing correct

Re: Another C compiler shift bug?

2014-05-13 Thread Paul Gilmartin
On Tue, 13 May 2014 17:47:39 -0400, Tony Harminc wrote: On 8 May 2014 19:34, Farley, Peter x23353 wrote: ST doesn't accept a 3-modifier expression, that is an artifact of the XL C/C++ assembler listing format. This is really really annoying, and has been for years. The compiler is now quite

Re: Another C compiler shift bug?

2014-05-09 Thread retired mainframer
:: -Original Message- :: From: IBM Mainframe Discussion List [mailto:IBM-MAIN@LISTSERV.UA.EDU] On :: Behalf Of Paul Gilmartin :: Sent: Thursday, May 08, 2014 3:36 PM :: To: IBM-MAIN@LISTSERV.UA.EDU :: Subject: Re: Another C compiler shift bug? :: :: On Thu, 8 May 2014 15:16:26 -0700

Another C compiler shift bug?

2014-05-08 Thread Charles Mills
Am I missing something here? Consider the following C statement: unsigned long long maxBit = 0x1 (arraySize-3); When arraySize is 66, maxBit is ending up as zero (instead of what I would expect, X'8000'. Am I missing something? Here is the LIST output. (No optimization.) *

Re: Another C compiler shift bug?

2014-05-08 Thread retired mainframer
:: -Original Message- :: From: IBM Mainframe Discussion List [mailto:IBM-MAIN@LISTSERV.UA.EDU] On :: Behalf Of Charles Mills :: Sent: Thursday, May 08, 2014 3:16 PM :: To: IBM-MAIN@LISTSERV.UA.EDU :: Subject: Another C compiler shift bug? :: :: Am I missing something here? Consider

Re: Another C compiler shift bug?

2014-05-08 Thread Paul Gilmartin
On Thu, 8 May 2014 15:16:26 -0700, Charles Mills wrote: Am I missing something here? Consider the following C statement: unsigned long long maxBit = 0x1 (arraySize-3); When arraySize is 66, maxBit is ending up as zero (instead of what I would expect, X'8000'. Am I missing

Re: Another C compiler shift bug?

2014-05-08 Thread Charles Mills
, May 08, 2014 3:16 PM To: IBM-MAIN@LISTSERV.UA.EDU Subject: Another C compiler shift bug? Am I missing something here? Consider the following C statement: unsigned long long maxBit = 0x1 (arraySize-3); When arraySize is 66, maxBit is ending up as zero (instead of what I would expect, X

Re: Another C compiler shift bug?

2014-05-08 Thread Charles Mills
Yer right. Charles -Original Message- From: IBM Mainframe Discussion List [mailto:IBM-MAIN@LISTSERV.UA.EDU] On Behalf Of retired mainframer Sent: Thursday, May 08, 2014 3:31 PM To: IBM-MAIN@LISTSERV.UA.EDU Subject: Re: Another C compiler shift bug? :: -Original Message- :: From

Re: Another C compiler shift bug?

2014-05-08 Thread Paul Gilmartin
On Thu, 8 May 2014 15:35:39 -0700, Charles Mills wrote: Hmmm. Well, I beat the compiler into submission ... beat? Actually I believe you lulled it into submission. ... SLDL r2,0(r1) LR r0,r3 LR r1,r2 ST r1,maxBit(,r13,248)

Re: Another C compiler shift bug?

2014-05-08 Thread Charles Mills
List [mailto:IBM-MAIN@LISTSERV.UA.EDU] On Behalf Of Paul Gilmartin Sent: Thursday, May 08, 2014 4:01 PM To: IBM-MAIN@LISTSERV.UA.EDU Subject: Re: Another C compiler shift bug? On Thu, 8 May 2014 15:35:39 -0700, Charles Mills wrote: Hmmm. Well, I beat the compiler into submission ... beat

Re: Another C compiler shift bug?

2014-05-08 Thread Farley, Peter x23353
@LISTSERV.UA.EDU Subject: Re: Another C compiler shift bug? On Thu, 8 May 2014 15:35:39 -0700, Charles Mills wrote: Hmmm. Well, I beat the compiler into submission ... beat? Actually I believe you lulled it into submission. ... SLDL r2,0(r1) LR r0