Re: ANSI-strict pointer aliasing rules

Поиск
Список
Период
Сортировка
От Martijn van Oosterhout
Тема Re: ANSI-strict pointer aliasing rules
Дата
Msg-id 20060426210151.GD11828@svana.org
обсуждение исходный текст
Ответ на ANSI-strict pointer aliasing rules  (Taral <taralx@gmail.com>)
Ответы Re: ANSI-strict pointer aliasing rules  (Taral <taralx@gmail.com>)
Список 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@svana.org>   http://svana.org/kleptog/
> From each according to his ability. To each according to his ability to litigate.

В списке pgsql-hackers по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: ANSI-strict pointer aliasing rules
Следующее
От: Martijn van Oosterhout
Дата:
Сообщение: Re: ANSI-strict pointer aliasing rules