Re: int8.c compile problem on UnixWare 7.x
От | Bruce Momjian |
---|---|
Тема | Re: int8.c compile problem on UnixWare 7.x |
Дата | |
Msg-id | 200004050345.XAA18599@candle.pha.pa.us обсуждение исходный текст |
Ответ на | int8.c compile problem on UnixWare 7.x ("Billy G. Allie" <Bill.Allie@mug.org>) |
Список | pgsql-hackers |
> > 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 > > I found a different patch that will fix the problem. It compiles and the > resulting binary passes the regression tests. Here is the patch. I am inclined not to apply it. While I realizes it fixes the problem on your platform, it is one of those bugs I would rather pass back to the compiler author than fix it in our code. Comments from others? Is this a popular compiler, or are you the only one likely to be using that version with that bug? The change is i > 0 to 0 < i. Wow, if such a change fixes your compiler for int8's, I really would not trust it for anything. --------------------------------------------------------------------------- *** ./src/backend/utils/adt/int8.c.orig Mon Apr 3 13:24:12 2000--- ./src/backend/utils/adt/int8.c Mon Apr 3 13:28:472000****************** 410,416 **** if (*arg1 < 1) *result = 0; else! for (i = *arg1, *result = 1; i > 0; --i) *result *= i; return result;--- 410,416 ---- if (*arg1 < 1) *result = 0; else! for (i = *arg1, *result = 1; 0 < i; --i) *result *= i; -- 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, Pennsylvania19026
В списке pgsql-hackers по дате отправления: