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

Re: ANSI-strict pointer aliasing rules

From: mark(at)mark(dot)mielke(dot)cc
To: Greg Stark <gsstark(at)mit(dot)edu>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>,Martijn van Oosterhout <kleptog(at)svana(dot)org>,Taral <taralx(at)gmail(dot)com>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: ANSI-strict pointer aliasing rules
Date: 2006-04-27 05:00:26
Message-ID: 20060427050026.GA21084@mark.mielke.cc (view raw or flat)
Thread:
Lists: pgsql-hackers
On Wed, Apr 26, 2006 at 11:42:11PM -0400, Greg Stark wrote:
> Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> writes:
> > As I read the spec, ANSI aliasing says that a given value must always be
> > accessed through equivalent (up to signedness) primitive types
> It there a difference between C89 and C99 here?

I believe C89 makes no reference to aliasing restrictions. It only leaves
certain operations, in certain contexts, implementation defined. That is,
if you wish to maintain portable behaviour, you would choose not to make
use of C features that have implementation defined semantics... :-)

Cheers,
mark

-- 
mark(at)mielke(dot)cc / markm(at)ncf(dot)ca / markm(at)nortel(dot)com     __________________________
.  .  _  ._  . .   .__    .  . ._. .__ .   . . .__  | Neighbourhood Coder
|\/| |_| |_| |/    |_     |\/|  |  |_  |   |/  |_   | 
|  | | | | \ | \   |__ .  |  | .|. |__ |__ | \ |__  | Ottawa, Ontario, Canada

  One ring to rule them all, one ring to find them, one ring to bring them all
                       and in the darkness bind them...

                           http://mark.mielke.cc/


In response to

pgsql-hackers by date

Next:From: Jim C. NasbyDate: 2006-04-27 05:20:47
Subject: Re: Autovacuum Logging
Previous:From: Jim C. NasbyDate: 2006-04-27 04:52:43
Subject: Re: [HACKERS] pg_dump

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