Re: Obsolete TODO item "-Wcast-align" ?

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Obsolete TODO item "-Wcast-align" ?
Дата
Msg-id 14863.1473026169@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Obsolete TODO item "-Wcast-align" ?  (Christian Convey <christian.convey@gmail.com>)
Ответы Re: Obsolete TODO item "-Wcast-align" ?  (Christian Convey <christian.convey@gmail.com>)
Список pgsql-hackers
Christian Convey <christian.convey@gmail.com> writes:
> I chose this item from the TODO page: "[E] Remove warnings created by
> -Wcast-align".  It didn't have a check-mark after the "[E]", which I
> took to mean it's an outstanding issue.
> However, I'm starting to wonder if it's already been fixed:

No, but you only see it on some platforms/compilers.  On my OS X laptop
(clang-based not gcc-based compiler), turning that on generates just a
hair short of 13000 warnings :-(

I think that TODO item is indeed obsolete, but more in the direction
of "we're never gonna do that".  There are too many places where we
do need to cast up from generic pointer to specific structure pointer,
and there doesn't seem to be any practical way to tell a compiler which
instances are useful to warn about.
        regards, tom lane



В списке pgsql-hackers по дате отправления:

Предыдущее
От: Tomas Vondra
Дата:
Сообщение: Re: Speed up Clog Access by increasing CLOG buffers
Следующее
От: Christian Convey
Дата:
Сообщение: Re: Obsolete TODO item "-Wcast-align" ?