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: | 20060426210151.GD11828@svana.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
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
compiler?
> 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
that.
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.
From | Date | Subject | |
---|---|---|---|
Next Message | Martijn van Oosterhout | 2006-04-26 21:16:12 | Re: ANSI-strict pointer aliasing rules |
Previous Message | Tom Lane | 2006-04-26 20:58:31 | Re: ANSI-strict pointer aliasing rules |