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

Re: Is this portable?

From: Zdenek Kotala <Zdenek(dot)Kotala(at)Sun(dot)COM>
To: Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Is this portable?
Date: 2007-04-02 19:48:29
Message-ID: 46115E0D.7020208@sun.com (view raw or flat)
Thread:
Lists: pgsql-hackers
Alvaro Herrera wrote:
> 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.
> 

It works fine with Sun Studio 11.

		Zdenek

In response to

Responses

pgsql-hackers by date

Next:From: Bruce MomjianDate: 2007-04-02 19:57:40
Subject: Re: So are we calling it: Feature Freeze?
Previous:From: Tom LaneDate: 2007-04-02 19:46:04
Subject: Re: CheckpointStartLock starvation

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