[ewg] Compiler warnings in backport patches

Jeff Squyres jsquyres at cisco.com
Thu Mar 22 07:56:30 PDT 2007


On Mar 22, 2007, at 9:57 AM, Roland Dreier wrote:

> No, I don't think warning-free code is a good goal.  First of all, for
> a project like OFED, being warning-free isn't really all that easy to
> even define, given that warnings come and go depending on compiler
> version.  Second, some warnings are compiler bugs, plain and simple,
> and making code worse to hide them just isn't a good idea.

Agreed that sometimes making a warning go away is painful and stupid  
(e.g., a compiler bug), but at least most of the time, adding an  
extra cast or whatever to make the warning go away is not *harmful*.

FWIW: We try very hard to make warning-free code in OMPI (admittedly  
-- a bit different in scope) and it helps *tremendously* for the  
reasons that Betsy cited: being able to find real new warnings /  
problems that crop up during normal development.

In short: we have found the benefits outweigh the costs.

-- 
Jeff Squyres
Cisco Systems




More information about the ewg mailing list