tinycc-devel
[Top][All Lists]
Advanced

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

Re: [Tinycc-devel] Can you consider to add -Werror option?


From: Thomas Preud'homme
Subject: Re: [Tinycc-devel] Can you consider to add -Werror option?
Date: Sun, 09 Feb 2014 23:48:36 +0800
User-agent: KMail/4.11.5 (Linux/2.6.38-ac2-ac100; KDE/4.11.5; armv7l; ; )

Le samedi 8 février 2014, 11:51:31 Christian Jullien a écrit :
> Since you pay attention of warnings (as -Wall implies, which is good), may I
> suggest to also add -Werror ?
> 
> 
> 
> For all the projects I worked on, I always fought developers to improve code
> quality. I never tolerated any warnings as, most of the time, a warning may
> be a potential bug.
> 
> With nice -Werror (-WX on Windows) I no more fight again :o)

I agree that more warning is good in general as long as they get silenced one 
way or another else we start ignoring them. In the case of tinycc there are 
many unused-variable due to conditionals so that kind of warning ought to be 
ignored. I guess this don't generally hides bug and adding some more ifdef 
just to avoid warning is bad. There are also a couple of place with ignored 
return value which triggers some warning and I know grischka is against the 
idea of adding (void) in front of such function call (I personally like the 
idea to explicitly says we ignore a return value).

But before adding -Werror we should fix remaining warnings and I think there is 
a few on x86 precisely due to conditionals as said above. Then why not, I'm 
not opposed to the idea, it should be tried first and see how much warning it 
triggers and how many of them seems like potential bug. I looked at the result 
of tcc compilation by clang for the same kind of reason.

Best regards,

Thomas



reply via email to

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