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

Is this portable?

From: Alvaro Herrera <alvherre(at)commandprompt(dot)com>
To: Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Is this portable?
Date: 2007-04-02 19:22:08
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-hackers
Can I declare a struct in a function's declaration section?  Something
like this:

static void
	struct foo {
		Oid		foo;
		int		bar;

	struct foo baz; = InvalidOid; = 42;


I tried here and GCC does not complain, with -std=c89 -pedantic.

Alvaro Herrera                      
PostgreSQL Replication, Consulting, Custom Development, 24x7 support


pgsql-hackers by date

Next:From: Bruce MomjianDate: 2007-04-02 19:29:04
Subject: Re: Is this portable?
Previous:From: Heikki LinnakangasDate: 2007-04-02 19:00:03
Subject: CheckpointStartLock starvation

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