From: | Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us> |
---|---|
To: | Andrew Dunstan <andrew(at)dunslane(dot)net> |
Cc: | PostgreSQL Hackers Mailing List <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: compile warning |
Date: | 2003-10-11 15:26:37 |
Message-ID: | 200310111526.h9BFQbG05917@candle.pha.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Andrew Dunstan wrote:
>
> I have a fix for this which I will post to patches - essentially you cast
> the pointers to (void *) and the compiler doesn't complain. It would be a
> pity to turn off strict aliasing altogether, as it is known to improve
> performance in some cases.
>
> Tested on Cygwin/GCC 3.3.1
I am not sure about the patch. I know it fixes it, but is the compiler
actually reporting a valid concern, or is it broken? Is it complaining
about passing a struct pointer of one type to another? Don't we do that
all over the place?
I hate to add a patch just to fix a buggy version of a compiler. If we
do apply this patch, I think we should cast to (void *), then to the
valid type, and add a comment in each instance about its purpose.
--
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 | Andrew Piskorski | 2003-10-11 15:37:14 | OpenORB Re: 2-phase commit |
Previous Message | Andrew Dunstan | 2003-10-11 14:00:16 | fix for strict-alias warnings |