Re: Why does load_external_function() return PGFunction?
От
Andres Freund
Тема
Re: Why does load_external_function() return PGFunction?
Дата
Msg-id
20180510204559.u2xlkp2oczxurndm@alap3.anarazel.de
Ответ на
Re: Why does load_external_function() return PGFunction? (Robert Haas)
Список
Дерево обсуждения
Why does load_external_function() return PGFunction? Andres Freund <andres@anarazel.de>
Re: Why does load_external_function() return PGFunction? Tom Lane <tgl@sss.pgh.pa.us>
Re: Why does load_external_function() return PGFunction? Andres Freund <andres@anarazel.de>
Re: Why does load_external_function() return PGFunction? Tom Lane <tgl@sss.pgh.pa.us>
Re: Why does load_external_function() return PGFunction? Peter Eisentraut <peter.eisentraut@2ndquadrant.com>
Re: Why does load_external_function() return PGFunction? Andres Freund <andres@anarazel.de>
Re: Why does load_external_function() return PGFunction? Robert Haas <robertmhaas@gmail.com>
Re: Why does load_external_function() return PGFunction? Andres Freund <andres@anarazel.de>
Re: Why does load_external_function() return PGFunction? Andres Freund <andres@anarazel.de>
Re: Why does load_external_function() return PGFunction? Robert Haas <robertmhaas@gmail.com>
Re: Why does load_external_function() return PGFunction? Andres Freund <andres@anarazel.de>
Re: Why does load_external_function() return PGFunction? Robert Haas <robertmhaas@gmail.com>
Re: Why does load_external_function() return PGFunction? Tom Lane <tgl@sss.pgh.pa.us>
Re: Why does load_external_function() return PGFunction? Andres Freund <andres@anarazel.de>
Re: Why does load_external_function() return PGFunction? Tom Lane <tgl@sss.pgh.pa.us>
Re: Why does load_external_function() return PGFunction? Andres Freund <andres@anarazel.de>
On 2018-05-10 16:41:53 -0400, Robert Haas wrote: > On Mon, Mar 26, 2018 at 4:16 PM, Andres Freund wrote: > > I dug up a thread about the introduction of the warning: > > https://gcc.gnu.org/ml/gcc-patches/2017-10/msg00423.html > > > > Sounds like we should add something like > > typedef void (*GenericFuncPtr) (void); > > or such? Similar to what Tom proposed upthread. > > His proposal was void (*)() rather than void (*)(void). I see that > the email to which you linked expects the latter, but I guess I would > have expected the former to be an intentional statement that we don't > know what the parameter list is. My expectations may be wrong, > though, or just irrelevant. Possible. But IIRC the parameter-unknown form isn't valid C++ and Peter Eisentraut has done a good chunk of work to make it possible to compile postgres as that. We shouldn't make his job harder. IMO the important part isn't that the parameters fit exactly - we'll have to cast for the return type anyway - but that it's declared as a pointer-to-function for the hyptothetical supported platform that has different pointers to functions than to other objects. Greetings, Andres Freund
В списке pgsql-hackers по дате отправления
От: Tom Lane
Дата: