Sun Studio is producing these compiler warnings (among others):
"tsquery_op.c", line 193: warning: syntax error: empty declaration
"tsquery_op.c", line 194: warning: syntax error: empty declaration
"tsquery_op.c", line 195: warning: syntax error: empty declaration
"tsquery_op.c", line 196: warning: syntax error: empty declaration
"tsquery_op.c", line 197: warning: syntax error: empty declaration
"tsquery_op.c", line 198: warning: syntax error: empty declaration
"tsvector_op.c", line 177: warning: syntax error: empty declaration
"tsvector_op.c", line 178: warning: syntax error: empty declaration
"tsvector_op.c", line 179: warning: syntax error: empty declaration
"tsvector_op.c", line 180: warning: syntax error: empty declaration
"tsvector_op.c", line 181: warning: syntax error: empty declaration
"tsvector_op.c", line 182: warning: syntax error: empty declaration
"tsvector_op.c", line 183: warning: syntax error: empty declaration
This relates to the following sort of code:
#define CMPFUNC( NAME, CONDITION ) \
Datum \
NAME(PG_FUNCTION_ARGS) { \
TSQuery a = PG_GETARG_TSQUERY_COPY(0); \
TSQuery b = PG_GETARG_TSQUERY_COPY(1); \
int res = CompareTSQ(a,b); \
\
PG_FREE_IF_COPY(a,0); \
PG_FREE_IF_COPY(b,1); \
\
PG_RETURN_BOOL( CONDITION ); \
}
CMPFUNC(tsquery_lt, res < 0);
CMPFUNC(tsquery_le, res <= 0);
CMPFUNC(tsquery_eq, res == 0);
CMPFUNC(tsquery_ge, res >= 0);
CMPFUNC(tsquery_gt, res > 0);
CMPFUNC(tsquery_ne, res != 0);
The closing semicolon is strictly speaking not allowed here. We could
remove it, but that would probably upset pgindent?
I recall that we used to have a bunch of similar problems with the AIX
compilers a long time ago. Does anyone recall the solution, and do we
still care? (Note that it's only a warning in this case.)
--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers