Re: strict aliasing (was: const correctness)

Поиск
Список
Период
Сортировка
От Andres Freund
Тема Re: strict aliasing (was: const correctness)
Дата
Msg-id 201111150033.13627.andres@anarazel.de
обсуждение исходный текст
Ответ на Re: strict aliasing (was: const correctness)  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: strict aliasing  (Florian Weimer <fweimer@bfk.de>)
Список pgsql-hackers
On Monday, November 14, 2011 10:22:52 PM Tom Lane wrote:
> "Kevin Grittner" <Kevin.Grittner@wicourts.gov> writes:
> >> Tom Lane <tgl@sss.pgh.pa.us> wrote:
> >>> Dunno ... where were the warnings exactly?
> > 
> > From HEAD checkout of a few minutes ago I now see only 9:
> Hmm ... well, none of those look likely to be in performance-sensitive
> areas.  But I wonder just how good the trouble-detection code is these
> days.
No idea about how good it is but you can make the detection code more 
aggressive by -Wstrict-aliasing=1 (which will produce more false positives).

I don't gcc will ever be able to call all possible misusages. E.g. The List 
api is a case where its basically impossible to catch everything (as gcc won't 
be able to figure out what the ListCell.data.ptr_value pointed to originally 
in the general case).

Andres


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

Предыдущее
От: Andres Freund
Дата:
Сообщение: Re: strict aliasing (was: const correctness)
Следующее
От: Josh Kupershmidt
Дата:
Сообщение: Re: proposal: psql concise mode