Re: [PATCH] Extend -Wint-in-bool-context to warn for multiplications

2016-10-24 Thread Jeff Law
On 10/23/2016 05:31 AM, Bernd Edlinger wrote: On 10/22/16 08:52, Bernd Edlinger wrote: > On 10/22/16 04:17, Martin Sebor wrote: >> On 10/21/2016 04:37 PM, Joseph Myers wrote: >>> The quoting in the diagnostic should be %<&&%>, not '&&'. >> >> Presumably same for '*' (i.e., %<*%>). >> >> But I

Re: [PATCH] Extend -Wint-in-bool-context to warn for multiplications

2016-10-23 Thread Bernd Edlinger
On 10/22/16 08:52, Bernd Edlinger wrote: > On 10/22/16 04:17, Martin Sebor wrote: >> On 10/21/2016 04:37 PM, Joseph Myers wrote: >>> The quoting in the diagnostic should be %<&&%>, not '&&'. >> >> Presumably same for '*' (i.e., %<*%>). >> >> But I would actually suggest a somewhat more formal phras

Re: [PATCH] Extend -Wint-in-bool-context to warn for multiplications

2016-10-21 Thread Bernd Edlinger
On 10/22/16 04:17, Martin Sebor wrote: > On 10/21/2016 04:37 PM, Joseph Myers wrote: >> The quoting in the diagnostic should be %<&&%>, not '&&'. > > Presumably same for '*' (i.e., %<*%>). > > But I would actually suggest a somewhat more formal phrasing than > "better use xxx here" such as "suggest

Re: [PATCH] Extend -Wint-in-bool-context to warn for multiplications

2016-10-21 Thread Martin Sebor
On 10/21/2016 04:37 PM, Joseph Myers wrote: The quoting in the diagnostic should be %<&&%>, not '&&'. Presumably same for '*' (i.e., %<*%>). But I would actually suggest a somewhat more formal phrasing than "better use xxx here" such as "suggest %<&&%> instead" or something akin to what's alre

Re: [PATCH] Extend -Wint-in-bool-context to warn for multiplications

2016-10-21 Thread Joseph Myers
The quoting in the diagnostic should be %<&&%>, not '&&'. -- Joseph S. Myers jos...@codesourcery.com

[PATCH] Extend -Wint-in-bool-context to warn for multiplications

2016-10-21 Thread Bernd Edlinger
Hi! This patch extends -Wint-in-bool-context to warn for multiplications if used in boolean context. This is rarely useful, and where used, could be easily replaced with && for instance. I think that multiplications in boolean context should be warned about, regardless of the used data type. Thi