Re: style for typedef of function that will be pointed to

Поиск
Список
Период
Сортировка
От Chapman Flack
Тема Re: style for typedef of function that will be pointed to
Дата
Msg-id 615C92B6.2090109@anastigmatix.net
обсуждение исходный текст
Ответ на Re: style for typedef of function that will be pointed to  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: style for typedef of function that will be pointed to  (Chapman Flack <chap@anastigmatix.net>)
Список pgsql-hackers
On 10/05/21 13:47, Tom Lane wrote:
>> An alternative I've sometimes used elsewhere is to typedef the function
>> type itself, and use the * when declaring a pointer to it:
>> typedef void Furbinator(char *furbee);
> 
> Is that legal C?  I doubt that it was before C99 or so.  As noted
> in the Ghostscript docs you came across, it certainly wouldn't have
> been portable back in the day.


It compiles silently for me with gcc --std=c89 -Wpedantic

I think that's the oldest standard I can ask gcc about. Per the manpage,
'c89' is ISO C90 without its amendment 1, and without any gnuisms.

Regards,
-Chap



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

Предыдущее
От: Antonin Houska
Дата:
Сообщение: Re: storing an explicit nonce
Следующее
От: Tomas Vondra
Дата:
Сообщение: Re: Next Steps with Hash Indexes