Re: fix for strict-alias warnings
От | Tom Lane |
---|---|
Тема | Re: fix for strict-alias warnings |
Дата | |
Msg-id | 15732.1066231467@sss.pgh.pa.us обсуждение исходный текст |
Ответ на | Re: fix for strict-alias warnings (Andrew Dunstan <andrew@dunslane.net>) |
Список | pgsql-patches |
Andrew Dunstan <andrew@dunslane.net> writes: > All this is interesting, but the real problem remains that we don't know > what else might be affected because gcc apparently doesn't promise to > tell us. IMO the gcc team made a bad mistake by turning this on by > default for -O2 without reliable accompanying diagnostics. Yeah, this seems to be the killer point. It *might* be safe to leave -fstrict-aliasing on; but we can't tell. I think we can safely just make the default switches for gcc be CFLAGS="-O2 -fno-strict-aliasing". If I understand correctly, this will work with all gcc versions back to 2.7.something, which is pretty much ancient history now --- and if anyone needs to make it work with such an old gcc, all they need do is specify CFLAGS to configure instead of letting it default. Will commit this change unless I hear objections soon. regards, tom lane
В списке pgsql-patches по дате отправления: