From: | Juan José Santamaría Flecha <juanjo(dot)santamaria(at)gmail(dot)com> |
---|---|
To: | Daniel Gustafsson <daniel(at)yesql(dot)se> |
Cc: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>, Greg Nancarrow <gregn4422(at)gmail(dot)com>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: Windows build warnings |
Date: | 2021-11-23 13:58:33 |
Message-ID: | CAC+AXB3drqaU3aT-NwFjMatbFhiiXGVOYWvjdTRPO9aW_p3j1Q@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Tue, Nov 23, 2021 at 2:11 PM Daniel Gustafsson <daniel(at)yesql(dot)se> wrote:
> > On 22 Nov 2021, at 16:40, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)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].
[1] https://docs.microsoft.com/en-us/cpp/cpp/attributes?view=msvc-170
Regards,
Juan José Santamaría Flecha
From | Date | Subject | |
---|---|---|---|
Next Message | Daniel Gustafsson | 2021-11-23 14:12:45 | Re: Support for NSS as a libpq TLS backend |
Previous Message | Amul Sul | 2021-11-23 13:53:22 | Re: [Patch] ALTER SYSTEM READ ONLY |