Skip site navigation (1) Skip section navigation (2)

Re: ANSI-strict pointer aliasing rules

From: Greg Stark <gsstark(at)mit(dot)edu>
To: Martijn van Oosterhout <kleptog(at)svana(dot)org>
Cc: mark(at)mark(dot)mielke(dot)cc, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Andrew Dunstan <andrew(at)dunslane(dot)net>, Taral <taralx(at)gmail(dot)com>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: ANSI-strict pointer aliasing rules
Date: 2006-04-27 16:43:37
Message-ID: 87slnz6kau.fsf@stark.xeocode.com (view raw or flat)
Thread:
Lists: pgsql-hackers
Martijn van Oosterhout <kleptog(at)svana(dot)org> writes:

> You're right, PostgreSQL uses a form of subclassing, so that a (for
> example) struct ArrayRefExprState is occasionally referred to using a
> (struct ExprState*) or even a (struct Node*). In C, the logical way to
> get that to work it by casting, do you have a better way?

There are other ways of achieving the same thing. Structs containing a union
for the subclass fields for example.

-- 
greg


In response to

Responses

pgsql-hackers by date

Next:From: Alvaro HerreraDate: 2006-04-27 16:47:36
Subject: Re: GIN - Generalized Inverted iNdex. Try 3.
Previous:From: Teodor SigaevDate: 2006-04-27 16:34:58
Subject: Re: GIN - Generalized Inverted iNdex. Try 3.

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group