This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Request for warnings on implicit bool to int conversions
On Tue, Mar 27, 2012 at 9:20 PM, Russ Allbery <rra@stanford.edu> wrote:
> Gabriel Dos Reis <gdr@integrable-solutions.net> writes:
>
>> I am trying to understand what the real issue is here. ?Do you want
>> -Wimplicit-char-to-int to? ?-Wimplicit-short-to-int? ?If not, why?
>> where to stop?
>
> I think it's more about conversion *to* bool than from bool,
I can easily see why an implicit conversion from int to bool might cause
a problem, even if that is what the language standard mandates -- just
look at the most common misuses of strcmp. But, that is not what the proposer
requested, which got me scratching my head.
-- Gaby