Can I declare a struct in a function's declaration section? Something
like this:
static void
foobar(void)
{
struct foo {
Oid foo;
int bar;
};
struct foo baz;
baz.foo = InvalidOid;
baz.bar = 42;
}
I tried here and GCC does not complain, with -std=c89 -pedantic.
--
Alvaro Herrera http://www.CommandPrompt.com/
PostgreSQL Replication, Consulting, Custom Development, 24x7 support
Responses
pgsql-hackers by date
| Next: | From: Bruce Momjian | Date: 2007-04-02 19:29:04 |
| Subject: Re: Is this portable? |
| Previous: | From: Heikki Linnakangas | Date: 2007-04-02 19:00:03 |
| Subject: CheckpointStartLock starvation |