Re: ANSI-strict pointer aliasing rules

Поиск
Список
Период
Сортировка
От Martijn van Oosterhout
Тема Re: ANSI-strict pointer aliasing rules
Дата
Msg-id 20060427175254.GK29830@svana.org
обсуждение исходный текст
Ответ на Re: ANSI-strict pointer aliasing rules  (Taral <taralx@gmail.com>)
Список pgsql-hackers
On Thu, Apr 27, 2006 at 12:21:55PM -0500, Taral wrote:
> > If we do subclassing like this:
> >
> > struct Node { ... };
> > struct Value { struct Node; ... };
> > etc.
> >
> > do we still run into the alias problem?
>
> Nope, it appears to get rid of the alias problem completely. But it
> requires anonymous structure support (C99?) to work without changing
> anything other than headers.

On that compiler maybe, but what about others? What other problems does
strict-alias cause? Anyway, near as I can tell, anonymous structs are
not in the C standard and I don't think GCC supports them either...

> As a bonus, if we ever change Node, we don't have to update any other
> structures...

Node is unlikely to ever change, it's been like this for at least ten
years...

Have a nice day,
--
Martijn van Oosterhout   <kleptog@svana.org>   http://svana.org/kleptog/
> From each according to his ability. To each according to his ability to litigate.

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

Предыдущее
От: Bruce Momjian
Дата:
Сообщение: Logging pg_autovacuum
Следующее
От: "Matthew T. O'Connor"
Дата:
Сообщение: Re: Logging pg_autovacuum