Re: compile warning
От | Bruce Momjian |
---|---|
Тема | Re: compile warning |
Дата | |
Msg-id | 200310111526.h9BFQbG05917@candle.pha.pa.us обсуждение исходный текст |
Ответ на | Re: compile warning ("Andrew Dunstan" <andrew@dunslane.net>) |
Список | 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@candle.pha.pa.us | (610) 359-1001+ If your life is a hard drive, | 13 Roberts Road + Christ can be your backup. | Newtown Square, Pennsylvania19073
В списке pgsql-hackers по дате отправления: