Re: Further news on Clang - spurious warnings
От | Tom Lane |
---|---|
Тема | Re: Further news on Clang - spurious warnings |
Дата | |
Msg-id | 3117.1312657087@sss.pgh.pa.us обсуждение исходный текст |
Ответ на | Re: Further news on Clang - spurious warnings (Peter Geoghegan <peter@2ndquadrant.com>) |
Список | pgsql-hackers |
Peter Geoghegan <peter@2ndquadrant.com> writes: > On 5 August 2011 20:07, Tom Lane <tgl@sss.pgh.pa.us> wrote: >> If I were trying to get rid of this warning, I'd be wondering why >> ReplNodeTag is a distinct enum in the first place. > Indeed, that doesn't seem to be justified anywhere, and seems to be a > violation of the abstraction of Node as a pseudo base class which > would have broken any "downcasting" that we might have attempted to > do. Since ReplNodeTag wasn't being used directly, just its enumeration > constants, simply moving the constants to the global, generic NodeTag > enum fixes the issue. > That is what the attached patch does. I did this plus moving replnodes.h into a saner spot: if they're full-fledged Nodes, they ought to be defined in src/include/nodes/. I did not renumber the existing node tags as your patch suggests. We might want to do that at some point to make a bit more breathing room, but I think it's too late in the 9.1 cycle to be doing that in 9.1. People have probably already built third-party code that incorporates values like T_ReturnSetInfo. regards, tom lane
В списке pgsql-hackers по дате отправления: