Re: fix for strict-alias warnings
От | Andrew Dunstan |
---|---|
Тема | Re: fix for strict-alias warnings |
Дата | |
Msg-id | 005b01c3914b$a80dfe90$6401a8c0@DUNSLANE обсуждение исходный текст |
Ответ на | Re: fix for strict-alias warnings (Bruce Momjian <pgman@candle.pha.pa.us>) |
Ответы |
Re: fix for strict-alias warnings
|
Список | pgsql-patches |
----- Original Message ----- From: "Tom Lane" <tgl@sss.pgh.pa.us> > Bruce Momjian <pgman@candle.pha.pa.us> writes: > > I have attached and applied the following patch to use makeNode for > > structures that will later be cast to Node*, rather than having them be > > allocated as stack variables. > > AFAICT, this adds unnecessary palloc overhead without actually reducing > the risk of optimization problems. > Even without the extra overhead, the danger of strict-aliasing is not just related to alignment. As I understand it, given strict-aliasing assumptions the compiler is free to reorder some operations on things it thinks can't be the same thing, or even optimise them away because they can have no effect. I'm not 100% sure we have avoided that danger. Quote from nice page on this subject: "ISO C is not your grandfather's C". :-) cheers andrew
В списке pgsql-patches по дате отправления: