Re: fix for strict-alias warnings
| От | Tom Lane |
|---|---|
| Тема | Re: fix for strict-alias warnings |
| Дата | |
| Msg-id | 10268.1066166604@sss.pgh.pa.us обсуждение исходный текст |
| Ответ на | Re: fix for strict-alias warnings (Manfred Spraul <manfred@colorfullife.com>) |
| Список | pgsql-patches |
Manfred Spraul <manfred@colorfullife.com> writes:
> Tom Lane wrote:
>> Is gcc 3.3 smart enough to optimize away the pointer alignment test
>> in the full macro?
>>
> 3.2 optimizes away the pointer alignment test, but then doesn't pipeline
> the "x*x" calculation.
Hm, confirmed here. So indeed it seems that Bruce was on the right
track --- setting up a Node structure as a local variable may be a
contributing factor.
> I don't have gcc 3.3 installed, but IMHO it would be insane to leave
> strict alias analysis enabled - writing to *(int32*)addr violates the
> alias rules, the bad code generated with MemSetAligned proved that.
While I don't really disagree, I am curious as to whether we are
actually forestalling any bugs; so far I'm not convinced that the
reported warnings correspond to real risks ...
regards, tom lane
В списке pgsql-patches по дате отправления: