Re: ANSI-strict pointer aliasing rules - Mailing list pgsql-hackers

From Martijn van Oosterhout
Subject Re: ANSI-strict pointer aliasing rules
Date
Msg-id 20060427175254.GK29830@svana.org
Whole thread Raw
In response to Re: ANSI-strict pointer aliasing rules  (Taral <taralx@gmail.com>)
List 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 by date:

Previous
From: Bruce Momjian
Date:
Subject: Logging pg_autovacuum
Next
From: "Matthew T. O'Connor"
Date:
Subject: Re: Logging pg_autovacuum