Re: Is this portable?

Поиск
Список
Период
Сортировка
От Bruce Momjian
Тема Re: Is this portable?
Дата
Msg-id 200704021929.l32JT4Q00786@momjian.us
обсуждение исходный текст
Ответ на Is this portable?  (Alvaro Herrera <alvherre@commandprompt.com>)
Список 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.

Sure.

--  Bruce Momjian  <bruce@momjian.us>          http://momjian.us EnterpriseDB
http://www.enterprisedb.com
 + If your life is a hard drive, Christ can be your backup. +


В списке pgsql-hackers по дате отправления:

Предыдущее
От: Alvaro Herrera
Дата:
Сообщение: Is this portable?
Следующее
От: Tom Lane
Дата:
Сообщение: Re: CheckpointStartLock starvation