bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: warnings from MacOS clang


From: Paul Eggert
Subject: Re: warnings from MacOS clang
Date: Thu, 27 May 2021 16:00:11 -0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.8.1

On 5/27/21 1:46 PM, Eric Blake wrote:

Yet another portable solution is:

static mbstate_t s1;
mbstate_t s = s1;

also with its own form of ugliness.

I did that years ago, but compilers complained about it when I made s1 'const', and I vaguely recall complaints even when it wasn't 'const' ("What? You're declaring a static variable that is always zero and never changes? That must be a bug!!").

At this point I wouldn't worry about the older clang and gcc versions that complain about {0} as an initializer. We can either let them die off noisily, or use the appropriate -Wno-whatever option when using them to compile.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]