Sujet : Re: constexpr keyword is unnecessary
De : lgusenet (at) *nospam* be-well.ilk.org (Lowell Gilbert)
Groupes : comp.lang.cDate : 04. Nov 2024, 18:57:16
Autres entêtes
Organisation : A noiseless patient Spider
Message-ID : <44msie3mrn.fsf@be-well.ilk.org>
References : 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
User-Agent : Gnus/5.13 (Gnus v5.13)
Tim Rentsch <
tr.17687@z991.linuxsc.com> writes:
scott@slp53.sl.home (Scott Lurndal) writes:
>
Tim Rentsch <tr.17687@z991.linuxsc.com> writes:
>
scott@slp53.sl.home (Scott Lurndal) writes:
>
Yes, we have a similar policy. Works well. In the odd case where
one cannot eliminate the warning, a simple compiler option to not
test that particulary condition for that particular compilation
unit is a straightforward solution.
>
So the actual policy is to fix all warnings except in
cases where it's inconvenient to fix them?
>
No, I never said that.
>
I didn't say you did. I asked a question because I didn't see
any clear statement of what the policy is that was being
followed. And I still haven't.
Not in so many words, no. Here is one that I have seen work well in
recent years: the code must compile without warnings. The usefulness of
this policy is strictly in making sure that any new warnings are
immediately noticed and considered, but are not an ongoing distraction.
The question of how to shut up a warning that is truly innocuous is not
part of this policy. In my own opinion, it will often require its own
policy. That is a separate topic, because it can quite reasonably vary
depending on a number of factors in the development environment, most
notably the compiler itself.
Be well.
-- Lowell Gilbert, embedded/networking software engineer http://be-well.ilk.org/~lowell/