Re: Erroneous -Werror=missing-braces on old GCC - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Erroneous -Werror=missing-braces on old GCC
Date
Msg-id 1738157.1703476653@sss.pgh.pa.us
Whole thread Raw
In response to Erroneous -Werror=missing-braces on old GCC  (Richard Guo <guofenglinux@gmail.com>)
Responses Re: Erroneous -Werror=missing-braces on old GCC
List pgsql-hackers
Richard Guo <guofenglinux@gmail.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



pgsql-hackers by date:

Previous
From: Japin Li
Date:
Subject: Re: Erroneous -Werror=missing-braces on old GCC
Next
From: Tom Lane
Date:
Subject: Re: Erroneous -Werror=missing-braces on old GCC