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

Re: ANSI-strict pointer aliasing rules

From: Martijn van Oosterhout <kleptog(at)svana(dot)org>
To: Taral <taralx(at)gmail(dot)com>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: ANSI-strict pointer aliasing rules
Date: 2006-04-26 21:01:51
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-hackers
On Wed, Apr 26, 2006 at 03:45:00PM -0500, Taral wrote:
> I ran afoul of these rules the other day when compiling pgsql 8.1 on
> AIX. The configure scripts are set up to look for "xlc" instead of
> "cc", and that command invokes cc with "-qalias=ansi", the ANSI-strict
> pointer aliasing mode.

PostgreSQL doesn't work with strict aliasing rules. That's why for GCC
we pass -fno-strict-aliasing. What's the equivalent option for that

> The fix is one of two things:

Well, there are a number of fixes, it's questionable whether it's worth
the effort. In GCC you can mark structures that are aliased to avoid
the problem (attribute((may_alias)) iirc), but we don't do that.

> 3. Get configure to select "cc" instead of "xlc": No code change,
> loses some performance.

4. Find the option for disabling strict alias and get configure to add

Have a nice day,
Martijn van Oosterhout   <kleptog(at)svana(dot)org>
> From each according to his ability. To each according to his ability to litigate.

In response to


pgsql-hackers by date

Next:From: Martijn van OosterhoutDate: 2006-04-26 21:16:12
Subject: Re: ANSI-strict pointer aliasing rules
Previous:From: Tom LaneDate: 2006-04-26 20:58:31
Subject: Re: ANSI-strict pointer aliasing rules

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