Path: csiph.com!eternal-september.org!feeder.eternal-september.org!reader01.eternal-september.org!.POSTED!not-for-mail
From: Tim Rentsch
Newsgroups: comp.lang.c++
Subject: Re: Don't be fooled by cpp.sh
Date: Fri, 10 Jan 2020 08:10:38 -0800
Organization: A noiseless patient Spider
Lines: 17
Message-ID: <86wo9z47i9.fsf@linuxsc.com>
References: <70391932-ccbc-4bc7-b693-881ab06eb6d3@googlegroups.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Injection-Info: reader02.eternal-september.org; posting-host="7b070c0766e341d0df2bb5814a4c869f"; logging-data="2755"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18ayNdNtAciqIDfJ+t29EQ3vm0cyTc7FRc="
User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.4 (gnu/linux)
Cancel-Lock: sha1:iOfRID/PfqqAuQONscttfOuKw9M= sha1:ag4vC6Gdpt2LdTiYCV7uiD/xtzI=
Xref: csiph.com comp.lang.c++:71260
Paavo Helde writes:
> On 31.12.2019 19:46, Bonita Montero wrote:
[...]
>> -Wunused-function
>> This would be disturbing if you would have the function in the
>> code for a later purpose.
>
> So you are checking in untested code.
On the contrary, such unused functions are completely tested:
any function that is never called cannot possibly misbehave. The
warning message saying the function is unused is the success
indicator for testing the function in question. It is only
functions that are called that might contain program errors.