Robert Haas <robertmh...@gmail.com> writes: > On Thu, May 10, 2018 at 4:45 PM, Andres Freund <and...@anarazel.de> wrote: >> 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.
> Probably the more relevant concern is what's going to compile > warning-free on all supported compilers. +1 > I think it's unlikely that > such a hypothetical supported platform actually exists, although maybe > I'm wrong. Such platforms certainly used to exist, and not that long ago either. I think the last common example was that Intel compilers used to let you choose the size of data pointers separately from the size of code pointers, cf https://en.wikipedia.org/wiki/Intel_Memory_Model There's some other entertaining reading here: https://en.wikipedia.org/wiki/Harvard_architecture Those sorts of pushups have fallen into disfavor with the availability of larger address spaces, and these days it's a bit hard to imagine anybody porting PG to a new platform that works like that. But that's why the C standard discourages considering code and data pointers as being interchangeable. regards, tom lane