Re: warnings for invalid function casts

Поиск
Список
Период
Сортировка
От Peter Eisentraut
Тема Re: warnings for invalid function casts
Дата
Msg-id c764383a-3f9e-f5ba-79d1-8824fe73340f@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-06-30 21:38, Tom Lane wrote:
> In any case, I think the issue here is what is the escape hatch for saying
> that "I know this cast is okay, don't warn about it, thanks".  Treating
> "void (*) (void)" as special for that purpose is nothing more nor less
> than a kluge, so another compiler might do it differently.  Given the
> POSIX restriction, I think we could reasonably use "void *" instead.

I think gcc had to pick some escape hatch that is valid also outside of 
POSIX, so they just had to pick something.  If we're disregarding 
support for these Harvard architecture type things, then we might as 
well use void * for easier notation.

Btw., one of the hunks in my patch was in PL/Python.  I have found an 
equivalent change in the core Python code, which does make use of void 
(*) (void): https://github.com/python/cpython/commit/62be74290aca

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



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

Предыдущее
От: Adam Brusselback
Дата:
Сообщение: Re: Persist MVCC forever - retain history
Следующее
От: Bruce Momjian
Дата:
Сообщение: Re: Default setting for enable_hashagg_disk (hash_mem)