From: | Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | Andrew Dunstan <andrew(at)dunslane(dot)net>, PG Patches <pgsql-patches(at)postgresql(dot)org> |
Subject: | Re: fix for strict-alias warnings |
Date: | 2003-10-14 00:31:56 |
Message-ID: | 200310140031.h9E0Vux03629@candle.pha.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers pgsql-patches |
Tom Lane wrote:
> "Andrew Dunstan" <andrew(at)dunslane(dot)net> writes:
> > Even without the extra overhead, the danger of strict-aliasing is not just
> > related to alignment.
>
> If I understand the issue at all, it has *nothing* to do with alignment.
>
> > As I understand it, given strict-aliasing assumptions
> > the compiler is free to reorder some operations on things it thinks can't be
> > the same thing, or even optimise them away because they can have no effect.
>
> Yah...
>
> > I'm not 100% sure we have avoided that danger.
>
> I don't think we understand the dangers quite yet, and I think the
> patches applied to date constitute useless thrashing rather than fixes.
> I'd like to see less quick-hack patching and more discussion.
>
> In particular, given that there is as yet no demonstrated effect other
> than mere warnings issued by a possibly-buggy gcc release, I think it's
> premature to be hacking our sources at all.
OK, patch removed. When no one commented after 24 hours on my
makeNode() idea, I though I was on to something. :-(
In reading http://www.gnu.org/software/gcc/bugs.html#nonbugs_c and the
link it references,
http://mail-index.netbsd.org/tech-kern/2003/08/11/0001.html, they seem
to be talking about any pointer casting.
It also has this gem:
I have seen some commits that "fix" gcc 3.3 alias warnings, that does
not give me warm fuzzy feelings (the commits that is), and I have alse
seen a lot of confusion about aliasing (and ISO C in general) on
different mailing lists, so I have tried to explain some of the issues
that I know have/will bite us.
indicating they might remove these warnings soon anyway.
I am not even going to point this gcc issue on the 7.4 open items list.
--
Bruce Momjian | http://candle.pha.pa.us
pgman(at)candle(dot)pha(dot)pa(dot)us | (610) 359-1001
+ If your life is a hard drive, | 13 Roberts Road
+ Christ can be your backup. | Newtown Square, Pennsylvania 19073
From | Date | Subject | |
---|---|---|---|
Next Message | Bruce Momjian | 2003-10-14 00:34:04 | Re: Heading to final release |
Previous Message | Tom Lane | 2003-10-14 00:27:01 | Re: Heading to final release |
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2003-10-14 04:37:20 | Re: fix for strict-alias warnings |
Previous Message | Peter Eisentraut | 2003-10-13 21:38:54 | Re: Russian NLS Update: psql |