Is this portable? - Mailing list pgsql-hackers

From Alvaro Herrera
Subject Is this portable?
Date
Msg-id 20070402192208.GH13946@alvh.no-ip.org
Whole thread Raw
Responses Re: Is this portable?
Re: Is this portable?
List pgsql-hackers
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


pgsql-hackers by date:

Previous
From: Hiroki Kataoka
Date:
Subject: Re: Proposal: Adding JIS X 0213 support
Next
From: Bruce Momjian
Date:
Subject: Re: Is this portable?