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

Re: ANSI-strict pointer aliasing rules

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
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 20:58:31
Message-ID: 21138.1146085111@sss.pgh.pa.us (view raw or flat)
Thread:
Lists: pgsql-hackers
Taral <taralx(at)gmail(dot)com> writes:
> 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.

We've looked at this before.  There's no way we are buying into the
strict aliasing rules: it's not so much the code we know will break,
as the fear of what we don't know about.  gcc, at least, is utterly
useless about warning about constructs that might change behavior
under strict aliasing ... but without fairly reliable warnings of
such problems, we have little hope of getting all the bugs out.

You'll notice that configure already goes out of its way to force
traditional aliasing for gcc, and I'd recommend doing the same for
AIX's compiler.

			regards, tom lane

In response to

Responses

pgsql-hackers by date

Next:From: Martijn van OosterhoutDate: 2006-04-26 21:01:51
Subject: Re: ANSI-strict pointer aliasing rules
Previous:From: Bruce MomjianDate: 2006-04-26 20:45:48
Subject: Re: [HACKERS] Enhanced containment selectivity function

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