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

From mark@mark.mielke.cc
Subject Re: ANSI-strict pointer aliasing rules
Date
Msg-id 20060427050026.GA21084@mark.mielke.cc
Whole thread Raw
In response to Re: ANSI-strict pointer aliasing rules  (Greg Stark <gsstark@mit.edu>)
List pgsql-hackers
On Wed, Apr 26, 2006 at 11:42:11PM -0400, Greg Stark wrote:
> Tom Lane <tgl@sss.pgh.pa.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@mielke.cc / markm@ncf.ca / markm@nortel.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
bindthem...
 
                          http://mark.mielke.cc/



pgsql-hackers by date:

Previous
From: "Jim C. Nasby"
Date:
Subject: Re: pg_dump
Next
From: Martijn van Oosterhout
Date:
Subject: Re: ANSI-strict pointer aliasing rules