From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | "Zeugswetter Andreas SB SD" <ZeugswetterA(at)spardat(dot)at> |
Cc: | "Bruce Momjian" <pgman(at)candle(dot)pha(dot)pa(dot)us>, thomas(at)pgsql(dot)com, "PostgreSQL Hackers Mailing List" <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: Call for platform testing |
Date: | 2001-11-28 15:25:34 |
Message-ID: | 2189.1006961134@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
"Zeugswetter Andreas SB SD" <ZeugswetterA(at)spardat(dot)at> writes:
> The PG_FUNCTION_INFO_V1 macro produces an annoying warning, that I
> cannot interpret:
> xlc -O2 -qmaxmem=16384 -qsrcmsg -qlonglong -DREFINT_VERBOSE -I.
> -I../../src/include -I/usr/local/include -c -o autoinc.o autoinc.c
> 8 | extern Pg_finfo_record * pg_finfo_autoinc (void);
> Pg_finfo_record * pg_finfo_a
> utoinc (void) { static Pg_finfo_record my_finfo = { 1 }; return
> &my_finfo; };
> ........................................................................
> ......
> ........................................................................
> ....a
> a - 1506-137 (E) Declaration must declare at least one declarator, tag,
> or the members of
> an enumeration.
It's not so much the macro as the semicolon after it. I get "Empty
declaration" warnings from HP's cc for those lines myself. Kind of
annoying, but not writing the semicolon in the source sounds uglier.
Is it worth adding a dummy declaration to the macro just to shut up
these compilers? We could probably make the macro produce bogus
extern declarations, say PG_FUNCTION_INFO_V1(foo) produces
extern Pg_finfo_record * pg_finfo_foo (void);
Pg_finfo_record * pg_finfo_foo (void)
{
static Pg_finfo_record my_finfo = { 1 };
return &my_finfo;
}
extern int pg_finfo_foo_dummy
which would satisfy even the most pedantic compiler ... unless it
chose to warn about unreferenced extern declarations, but I don't
think any do.
regards, tom lane
From | Date | Subject | |
---|---|---|---|
Next Message | Larry Rosenman | 2001-11-28 15:25:55 | Re: Call for platform testing |
Previous Message | Tom Lane | 2001-11-28 15:17:52 | Re: FW: [ppa-dev] Severe bug in debian - phppgadmin opens up |