It appears that some code in backend/utils/adt/int8.c tickles a compiler bug 
in SCO's UDK when it is compiled with optimazation turned on.  The attached 
patch, which rewrites a for statement as a while statement corrects the 
problem.


____       | Billy G. Allie    | Domain....: Bill.Allie@mug.org
|  /|      | 7436 Hartwell     | Compuserve: 76337,2061
|-/-|----- | Dearborn, MI 48126| MSN.......: B_G_Allie@email.msn.com
|/  |LLIE  | (313) 582-1540    |
Fri, 31 Mar 2000 14:39:14 -0500
"Billy G. Allie" <Bill.Allie@mug.org>
int8.c compile problem on UnixWare 7.x
-- Start of PGP signed section.
> It appears that some code in backend/utils/adt/int8.c tickles a compiler bug 
> in SCO's UDK when it is compiled with optimazation turned on.  The attached 
> patch, which rewrites a for statement as a while statement corrects the 
> problem.
Content-Description: uw7-20000331.patch


I am sorry Billy but the new code is much harder to understand than the
original, so I am not inclined to change it based on a compiler bug, for
which SCO is so famous.

If you wish to submit a patch that removes optimization from the
Makefile for the file or entire directory under SCO, I will consider it.
And I would document the change so we can remove it later.

-- 
  Bruce Momjian                        |  http://www.op.net/~candle
  pgman@candle.pha.pa.us               |  (610) 853-3000
  +  If your life is a hard drive,     |  830 Blythe Avenue
  +  Christ can be your backup.        |  Drexel Hill, Pennsylvania 19026

Sat, 1 Apr 2000 03:10:03 -0500 (EST)
Bruce Momjian <pgman@candle.pha.pa.us>
Re: int8.c compile problem on UnixWare 7.x
Bruce Momjian <pgman@candle.pha.pa.us> writes:
> I am sorry Billy but the new code is much harder to understand than the
> original, so I am not inclined to change it based on a compiler bug, for
> which SCO is so famous.

I agree that I'm not eager to uglify the code that much to avoid a
single-platform compiler bug.  Can it be worked around with less-ugly
changes?  I'd try changing the --i to i--, for example; and/or swapping
the order of the two initialization assignments.  Neither of those would
impair readability noticeably.

			regards, tom lane

Sat, 01 Apr 2000 23:49:55 -0500
Tom Lane <tgl@sss.pgh.pa.us>
Re: int8.c compile problem on UnixWare 7.x 