D26636: patch for llvm/clang bug 25965, suppress warning diagnostic on float-to-bool conversion when in condition context

Blower, Melanie via cfe-commits cfe-commits at lists.llvm.org
Fri Nov 18 10:02:27 PST 2016


Thanks for your question

The bug was originally posted in llvm bugs database, see 25965, there is discussion between Richard Smith and the submitter Gregory Pakosz which concludes "maybe we should suppress the diagnostic entirely".

Evidently there is fairly usage to guard against divide by zero like this:

if (f)  e/f; 

The spec warning in particular is driving the interest from Intel since it's difficult to get the spec source code changed

--Melanie

-----Original Message-----
From: Joerg Sonnenberger [mailto:joerg at NetBSD.org] 
Sent: Friday, November 18, 2016 11:16 AM
To: Blower, Melanie <melanie.blower at intel.com>; richard at metafoo.co.uk; Keane, Erich <erich.keane at intel.com>; david.majnemer at gmail.com
Cc: cfe-commits at lists.llvm.org
Subject: [PATCH] D26636: patch for llvm/clang bug 25965, suppress warning diagnostic on float-to-bool conversion when in condition context

joerg added a comment.

Besides "it triggers on SPEC", why should the warning be disabled here? I think it is perfectly sensible to have a warning for all six conditional contexts here.


https://reviews.llvm.org/D26636





More information about the cfe-commits mailing list