Re: warning: dereferencing type-punned pointer

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: warning: dereferencing type-punned pointer
Дата
Msg-id 1218071.1721829945@sss.pgh.pa.us
обсуждение исходный текст
Ответ на warning: dereferencing type-punned pointer  (Tatsuo Ishii <ishii@postgresql.org>)
Ответы Re: warning: dereferencing type-punned pointer
Список pgsql-hackers
Tatsuo Ishii <ishii@postgresql.org> writes:
> So I think the warnings in ExecEvalJsonExprPath are better fixed
> because these are the only places where IsA (nodeTag) macro are used
> and the warning is printed. Patch attached.

I'm not very thrilled with these changes.  It's not apparent why
your compiler is warning about these usages of IsA and not any other
ones, nor is it apparent why these changes suppress the warnings.
(The code's not fundamentally different, so I'd think the underlying
problem is still there, if there really is one at all.)
I'm afraid we'd be playing whack-a-mole to suppress similar warnings
on various compiler versions, with no end result other than making
the code uglier and less consistent.

If we can figure out why the warning is appearing, maybe it'd be
possible to adjust the definition of IsA() to prevent it.

            regards, tom lane



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

Предыдущее
От: Pavel Stehule
Дата:
Сообщение: Re: Send duration output to separate log files
Следующее
От: Ashutosh Bapat
Дата:
Сообщение: Re: [PATCH] GROUP BY ALL