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> http://svana.org/kleptog/
> 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 Oosterhout||Date: 2006-04-26 21:16:12|
|Subject: Re: ANSI-strict pointer aliasing rules|
|Previous:||From: Tom Lane||Date: 2006-04-26 20:58:31|
|Subject: Re: ANSI-strict pointer aliasing rules |