[Top][All Lists]

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

Re: warnings from MacOS clang

From: Simon Josefsson
Subject: Re: warnings from MacOS clang
Date: Fri, 28 May 2021 19:49:16 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1 (gnu/linux)

arnold@skeeve.com writes:

>> 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.
> I've decided to just not worry about it. It's impossible to compile
> without warnings on every single C compiler in the world.

Indeed, and further, I believe that changing code to silence warnings
from any non-modern or preferred compilers is counter-productive.  Even
further, I also believe that if we run into a situation where modern gcc
(or clang?) produces a warning we don't agree with, we should try to get
that fixed in the compiler and not make any code change.

This approach unfortunately implies that we can't add -Werror to the
default flags, something I earlier thought was a nice goal, but have
reconsidered: it is better to have warnings for things we believe the
compiler shouldn't warn about, than to modify code to silence the
compiler, even if it is a modern gcc.  In an ideal world, compilers
shouldn't warn about things we believe it shouldn't warn about, but
we'll never reach it so we shouldn't use -Werror.


Attachment: signature.asc
Description: PGP signature

reply via email to

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