Re: undersized unions

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: undersized unions
Дата
Msg-id 2346143.1675574215@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: undersized unions  (Michael Paquier <michael@paquier.xyz>)
Ответы Re: undersized unions  (Andres Freund <andres@anarazel.de>)
Список pgsql-hackers
Michael Paquier <michael@paquier.xyz> writes:
> On Sat, Feb 04, 2023 at 05:07:08AM -0800, Andres Freund wrote:
>> We actually have a fair amount of code like that, but currently are
>> escaping most of the warnings, because gcc doesn't know that palloc() is
>> an allocator. With more optimizations (particularly with LTO), we end up
>> with more of such warnings.  I'd like to annotate palloc so gcc
>> understands the size, as that does help to catch bugs when confusing the
>> type. It also helps static analyzers.

> Ah, that seems like a good idea in the long run.

I'm kind of skeptical about whether we'll be able to get rid of all
the resulting warnings without extremely invasive (and ugly) changes.

            regards, tom lane



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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: File descriptors in exec'd subprocesses
Следующее
От: Pavel Stehule
Дата:
Сообщение: Re: proposal: psql: psql variable BACKEND_PID