Re: Further news on Clang - spurious warnings
| От | Peter Geoghegan |
|---|---|
| Тема | Re: Further news on Clang - spurious warnings |
| Дата | |
| Msg-id | CAEYLb_VfbN14+8zi_hSAT-a8oVH_SXQd4SsP8h2JZYU=rfGTJw@mail.gmail.com обсуждение исходный текст |
| Ответ на | Re: Further news on Clang - spurious warnings (Tom Lane <tgl@sss.pgh.pa.us>) |
| Ответы |
Re: Further news on Clang - spurious warnings
|
| Список | pgsql-hackers |
On 5 August 2011 20:07, Tom Lane <tgl@sss.pgh.pa.us> wrote: > This patch is a truly horrid idea, as it eliminates the error checking > the compiler is trying to provide, and does so globally not only in the > trouble spots. I think that the mistake I may have made here was assuming that the existing code was perfect, and therefore it was a simply matter of tweaking. With that assumption in mind, the only fix could have been a global fix. I should not have acted in haste. > 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. -- Peter Geoghegan http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Training and Services
Вложения
В списке pgsql-hackers по дате отправления: