On 11/29/11 13:19, Eric Blake wrote: > hard to disable the warning if you don't want it, but leaving it in > leads to smaller executable size for the cases where 1.0F is sufficient > (compared to the extra size required to represent 1.0 which is 1.0D).
1.0D? But the C standard doesn't allow that. Surely such a constant can't be used in portable code. So I don't see how the warning can be useful in practice. >> While we're on the subject of manywarnings.m4, can we also >> remove -Wdouble-promotion and -Wformat-zero-length? They >> also seem to be more suited for special- rather than >> general-purpose code. > > Do you have instances in the wild where these triggered? No, it's just my instinct -- I gave an example for -Wformat-zero-length in my earlier email, and my instinct also is that widening float to double is no more problematic than widening int to long (which I surely don't want a warning for). > I had to add -Wno-format-nonliteral to counteract that, while still > benefitting from the rest of -Wformat=2. I'd be in favor of that as well. format-nonliteral is a warning that typically causes more harm than it cures, in my experience.