Peter Eisentraut <peter.eisentr...@2ndquadrant.com> writes: > In order to reduce the number of useless casts and make the useful casts > more interesting, here is a patch that automatically casts the result of > copyNode() back to the input type, if the compiler supports something > like typeof(), which most current compilers appear to. That gets us > some more type safety and we only need to retain the casts that actually > do change the type.
But doesn't this result in a boatload of warnings on compilers that don't have typeof()? If typeof() were in C99 I might figure that is an okay tradeoff, but it isn't. I'm not sure that this is the most useful place to be moving our C standards compliance expectations by 20 years in one jump. Also, if your answer is "you shouldn't get any warnings because copyObject is already declared to return void *", then why aren't we just relying on that today? regards, tom lane -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers