Re: strict aliasing (was: const correctness)
| От | Martijn van Oosterhout |
|---|---|
| Тема | Re: strict aliasing (was: const correctness) |
| Дата | |
| Msg-id | 20111114224419.GC29764@svana.org обсуждение исходный текст |
| Ответ на | Re: strict aliasing (was: const correctness) (Alvaro Herrera <alvherre@commandprompt.com>) |
| Список | pgsql-hackers |
On Mon, Nov 14, 2011 at 06:25:19PM -0300, Alvaro Herrera wrote: > > All 10 were like this: > > > > warning: dereferencing type-punned pointer will break > > strict-aliasing rules > > Uhm, shouldn't we expect there to be one warning for each use of a Node > using some specific node pointer type as well as something generic such > as inside a ListCell etc? Maybe they're safe? But in any case given the use of Node, a may be an idea to mark it with attribute((__may_alias__)), that should clear up most of the problems in that area. http://ohse.de/uwe/articles/gcc-attributes.html#type-may_alias Have a nice day, -- Martijn van Oosterhout <kleptog@svana.org> http://svana.org/kleptog/ > He who writes carelessly confesses thereby at the very outset that he does > not attach much importance to his own thoughts. -- Arthur Schopenhauer
В списке pgsql-hackers по дате отправления: