Re: Floating point performance issue

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

 



2011/12/21 David Brown <david@xxxxxxxxxxxxxxx>:
> I think our key difference of opinion here is that you want a warning only
> when it is quite clear that "something dodgy" is happening - I want the
> warning unless it is quite clear that something dodgy is /not/ happening.

Er, well feel free to turn on the warning for code you write...

But the _default_ settings (and what's included in "catch-all" options
like -Wall) are something altogether different.  They are a balancing
act, and must take into account many different programming styles, and
avoid excessive false positives[1], which are quite annoying,
especially when there isn't a clear alternative to what's being warned
about[2].  False negatives are less of an issue, as typically
"something is better than nothing"...

[1] Yes, in this case, a warning about a valid comparison _is_ a false
positive; the warning says "this is unsafe" for a comparison that is
safe

[2] E.g., "if (x = ...)" can be trivially rewritten as "x = ..; if
(x)", and doing so generally improves code readability without any
runtime penalty; however this isn't true for all constructs

-miles

-- 
Cat is power.  Cat is peace.



[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux