Re: Windows build warnings
От
Juan José Santamaría Flecha
Тема
Re: Windows build warnings
Дата
Msg-id
CAC+AXB3drqaU3aT-NwFjMatbFhiiXGVOYWvjdTRPO9aW_p3j1Q@mail.gmail.com
Ответ на
Re: Windows build warnings (Daniel Gustafsson)
Список
Дерево обсуждения
Windows build warnings Greg Nancarrow <gregn4422@gmail.com>
Re: Windows build warnings Daniel Gustafsson <daniel@yesql.se>
Re: Windows build warnings Alvaro Herrera <alvherre@alvh.no-ip.org>
Re: Windows build warnings Tom Lane <tgl@sss.pgh.pa.us>
Re: Windows build warnings Daniel Gustafsson <daniel@yesql.se>
Re: Windows build warnings Greg Nancarrow <gregn4422@gmail.com>
Re: Windows build warnings Tom Lane <tgl@sss.pgh.pa.us>
Re: Windows build warnings Daniel Gustafsson <daniel@yesql.se>
Re: Windows build warnings Andrew Dunstan <andrew@dunslane.net>
Re: Windows build warnings Tom Lane <tgl@sss.pgh.pa.us>
Re: Windows build warnings Daniel Gustafsson <daniel@yesql.se>
Re: Windows build warnings Andrew Dunstan <andrew@dunslane.net>
Re: Windows build warnings Daniel Gustafsson <daniel@yesql.se>
Re: Windows build warnings Daniel Gustafsson <daniel@yesql.se>
Re: Windows build warnings Tom Lane <tgl@sss.pgh.pa.us>
Re: Windows build warnings Daniel Gustafsson <daniel@yesql.se>
Re: Windows build warnings Dagfinn Ilmari Mannsåker <ilmari@ilmari.org>
Re: Windows build warnings Tom Lane <tgl@sss.pgh.pa.us>
Re: Windows build warnings Dagfinn Ilmari Mannsåker <ilmari@ilmari.org>
Re: Windows build warnings Juan José Santamaría Flecha <juanjo.santamaria@gmail.com>
Re: Windows build warnings Alvaro Herrera <alvherre@alvh.no-ip.org>
Re: Windows build warnings Tom Lane <tgl@sss.pgh.pa.us>
Re: Windows build warnings Greg Nancarrow <gregn4422@gmail.com>
On Tue, Nov 23, 2021 at 2:11 PM Daniel Gustafsson <daniel@yesql.se> wrote:
> On 22 Nov 2021, at 16:40, Tom Lane <tgl@sss.pgh.pa.us> wrote:
> I can't find anything that is providing a non-empty definition of
> PG_USED_FOR_ASSERTS_ONLY (a/k/a pg_attribute_unused) for anything
> except GCC.
It's supported in clang as well per the documentation [0] in at least some
configurations or distributions:
"The [[maybe_unused]] (or __attribute__((unused))) attribute can be
used to silence such diagnostics when the entity cannot be removed.
For instance, a local variable may exist solely for use in an assert()
statement, which makes the local variable unused when NDEBUG is
defined."
[[maybe_unused]] is also recognized from Visual Studio 2017 onwards [1].
Regards,
Juan José Santamaría Flecha
В списке pgsql-hackers по дате отправления