Re: Further news on Clang - spurious warnings
От | Tom Lane |
---|---|
Тема | Re: Further news on Clang - spurious warnings |
Дата | |
Msg-id | 6329.1312571258@sss.pgh.pa.us обсуждение исходный текст |
Ответ на | Re: Further news on Clang - spurious warnings (Peter Geoghegan <peter@2ndquadrant.com>) |
Ответы |
Re: Further news on Clang - spurious warnings
|
Список | pgsql-hackers |
Peter Geoghegan <peter@2ndquadrant.com> writes: > Now, apart from the Flex warning, there are just 3 warnings left. They > all look like this: > repl_gram.y:106:30: warning: implicit conversion from enumeration type > 'enum ReplNodeTag' to different enumeration type 'NodeTag' (aka 'enum > NodeTag') [-Wconversion] > Attached patch fixes all 3 warnings with an explicit cast, 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. If I were trying to get rid of this warning, I'd be wondering why ReplNodeTag is a distinct enum in the first place. Surely it does not make sense to be using the Node mechanisms on something that isn't conforming to the standard node numbering. If these nodes ever got passed to anything else in the system, they'd get misinterpreted. So I'm inclined to think that clang has pointed out a real issue, rather than something we ought to paper over. regards, tom lane
В списке pgsql-hackers по дате отправления: