Обсуждение: geo_ops.c is broken
The recently checked-in backend/utils/adt/geo_ops.c does not compile
under gcc 2.7.2.2, because it has
#define LINEDEBUG
followed by several instances of
#if LINEDEBUG
... in other words #if with an empty expression, which I think gcc
has every right to object to. Either the #if's ought to be #ifdef's
or LINEDEBUG has to be #define'd as 1 rather than empty.
I changed the #if's to #ifdef's and found that it *still* doesn't
compile, because the code within the if's is seriously broken ---
it's got lines like
result->C = pt1->x;
where result is a char * and pt1 isn't even declared.
Backing out the #define LINEDEBUG makes it compile, but who checked
this stuff in anyway?
grumble, tom lane
> The recently checked-in backend/utils/adt/geo_ops.c does not compile
> under gcc 2.7.2.2,
> Backing out the #define LINEDEBUG makes it compile, but who checked
> this stuff in anyway?
Probably t'was moi. Will look at it, though I'm suprised that a #define
LINEDEBUG was in the code. I _always_ do that from the Makefile. I had
gotten some patches from Gautam Thaker which addressed a boundary
problem in one of the routines, and something funny must have crept in.
I'm not sure what went wrong considering that I took a (fairly) fresh
source and passed the regression tests with it...
Sorry to slow you up on testing int8 and type conversion stuff :)
- Tom
Looks like they are gone now. > The recently checked-in backend/utils/adt/geo_ops.c does not compile > under gcc 2.7.2.2, because it has > > #define LINEDEBUG > > followed by several instances of > > #if LINEDEBUG > > ... in other words #if with an empty expression, which I think gcc > has every right to object to. Either the #if's ought to be #ifdef's > or LINEDEBUG has to be #define'd as 1 rather than empty. > > I changed the #if's to #ifdef's and found that it *still* doesn't > compile, because the code within the if's is seriously broken --- > it's got lines like > result->C = pt1->x; > where result is a char * and pt1 isn't even declared. > > Backing out the #define LINEDEBUG makes it compile, but who checked > this stuff in anyway? > > grumble, tom lane > > -- Bruce Momjian | 830 Blythe Avenue maillist@candle.pha.pa.us | Drexel Hill, Pennsylvania 19026 + If your life is a hard drive, | (610) 353-9879(w) + Christ can be your backup. | (610) 853-3000(h)