Skip site navigation (1) Skip section navigation (2)

Re: Call for platform testing

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 (view raw or flat)
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

In response to

pgsql-hackers by date

Next:From: Larry RosenmanDate: 2001-11-28 15:25:55
Subject: Re: Call for platform testing
Previous:From: Tom LaneDate: 2001-11-28 15:17:52
Subject: Re: FW: [ppa-dev] Severe bug in debian - phppgadmin opens up

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group