Re: warnings for invalid function casts

Поиск
Список
Период
Сортировка
От Peter Eisentraut
Тема Re: warnings for invalid function casts
Дата
Msg-id d04f3b48-8195-aa83-8862-b6d3747fed30@2ndquadrant.com
обсуждение исходный текст
Ответ на Re: warnings for invalid function casts  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: warnings for invalid function casts  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
On 2020-07-03 16:40, Tom Lane wrote:
> Given that gcc explicitly documents "void (*) (void)" as being what
> to use, they're going to have a hard time changing their minds about
> that ... and gcc is dominant enough in this space that I suppose
> other compilers would have to be compatible with it.  So even though
> it's theoretically bogus, I suppose we might as well go along with
> it.  The typedef will allow a centralized fix if we ever find a
> better answer.

Do people prefer a typedef or just writing it out, like it's done in the 
Python code?

Attached is a provisional patch that has it written out.

I'm minimally in favor of that, since the Python code would be 
consistent with the Python core code, and the one other use is quite 
special and it might not be worth introducing a globally visible 
workaround for it.  But if we prefer a typedef then I'd propose 
GenericFuncPtr like in the initial patch.

-- 
Peter Eisentraut              http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services

Вложения

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

Предыдущее
От: "movead.li@highgo.ca"
Дата:
Сообщение: Re: A patch for get origin from commit_ts.
Следующее
От: Dilip Kumar
Дата:
Сообщение: Re: new heapcheck contrib module