Re: Erroneous -Werror=missing-braces on old GCC

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Richard Guo <guofenglinux(at)gmail(dot)com>
Cc: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Erroneous -Werror=missing-braces on old GCC
Date: 2023-12-25 03:57:33
Message-ID: 1738157.1703476653@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Richard Guo <guofenglinux(at)gmail(dot)com> writes:
> I came across the 'missing braces' warning again when building master
> (0a93f803f4) on old GCC (4.8.5).

On the one hand, it's probably pointless to worry about buggy
warnings from ancient compilers ...

> This has popped up a few times in the past, and it seems to be GCC bug
> 53119. We previously used the {{...}} approach to suppress it. Should
> we do the same here, like attached?
> FWIW, in the same file we initialize BlockRefTableSerializedEntry
> variables also with {{0}}.

... but there is a lot to be said for maintaining stylistic consistency.
Given that we're doing it this way elsewhere, we should do it in these
spots too.

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2023-12-25 04:23:49 Re: Erroneous -Werror=missing-braces on old GCC
Previous Message Japin Li 2023-12-25 03:48:37 Re: Erroneous -Werror=missing-braces on old GCC