Re: fix for strict-alias warnings

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: fix for strict-alias warnings
Дата
Msg-id 687.1066164185@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: fix for strict-alias warnings  (Manfred Spraul <manfred@colorfullife.com>)
Ответы Re: fix for strict-alias warnings  (Manfred Spraul <manfred@colorfullife.com>)
Список pgsql-patches
Manfred Spraul <manfred@colorfullife.com> writes:
> After some massaging, I've succeeded in generating bad code using a
> slightly modified MemSetAligned macro (parameters -O2
> -fstrict-aliasing): gcc pipelined the x*x around the memset.

As I already explained, we do not care about the MemSetAligned case.
Is gcc 3.3 smart enough to optimize away the pointer alignment test
in the full macro?

(Hm, if so, maybe that explains Bruce's observation that the warning
only shows up with Node structs that are allocated as local
variables, rather than palloc'd ... that would be the only case where
gcc could possibly optimize away the alignment test ...)

            regards, tom lane

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

Предыдущее
От: Neil Conway
Дата:
Сообщение: Re: fix for strict-alias warnings
Следующее
От: Peter Eisentraut
Дата:
Сообщение: Re: fix for strict-alias warnings