| От | Peter Eisentraut |
|---|---|
| Тема | Re: Further news on Clang - spurious warnings |
| Дата | |
| Msg-id | 1312395337.24208.2.camel@vanquo.pezone.net обсуждение исходный текст |
| Ответ на | Re: Further news on Clang - spurious warnings (Peter Geoghegan <peter@2ndquadrant.com>) |
| Список | pgsql-hackers |
On ons, 2011-08-03 at 10:25 +0100, Peter Geoghegan wrote:
> Attached patch removes the tautologolical part of an evaluated
> expression, fixing the problem flagged by this quite valid warning.
I think these warnings are completely bogus and should not be worked
around. Even in the most trivial case of
{ unsigned int foo;
...
if (foo < 0 && ...) ...
}
I would not want to remove the check, because as the code gets moved
around, refactored, reused, whatever, the unsigned int might change into
a signed int, and then you're hosed. It's fine for -Wextra, but not for
the -Wall level.
В списке pgsql-hackers по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера