Re: 2x compile warning

Поиск
Список
Период
Сортировка
От Bruce Momjian
Тема Re: 2x compile warning
Дата
Msg-id 200604242011.k3OKBCa09990@candle.pha.pa.us
обсуждение исходный текст
Ответ на Re: 2x compile warning  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
Tom Lane wrote:
> Kris Jurka <books@ejurka.com> writes:
> > Also I was testing a gcc 4.2 snapshot (20060419) and it has a whole lot of 
> > warnings stemming from heap_getattr's isnull check:
> > aclchk.c:791: warning: the address of 'isNull', will always evaluate as 
> > 'true'
> 
> We need to lobby the gcc maintainers to not give warnings about valid
> and perfectly reasonable code.  I'm not thrilled with changing the API
> of a key macro for no other reason than that gcc has started to complain
> about it.

Right.  The issue is that when I originally transfered that function to
a macro, the isnull parameter was optionally 0/NULL. While our code
doesn't use that ability, I see no reason to remove it.

I understand why it is complaining because you are really doing if
(&var), but it is a macro, so it can be used in other circumstances as
well.

--  Bruce Momjian   http://candle.pha.pa.us EnterpriseDB    http://www.enterprisedb.com
 + If your life is a hard drive, Christ can be your backup. +


В списке pgsql-hackers по дате отправления:

Предыдущее
От: "Magnus Hagander"
Дата:
Сообщение: Re: Regression error on float8
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Regression error on float8