Re: [PATCH] c++: Disable -Wint-in-bool-context in instantiations

2021-05-12 Thread Jason Merrill via Gcc-patches
On 5/12/21 12:21 PM, Marek Polacek wrote: This warning is of questionable value when it's emitted when instantiating a template, as in the following testcase. It could be silenced by writing hb(i) << 1 instead of 2 * hb(i) but that's unnecessary obfuscation. Bootstrapped/regtested on x86_64-pc-

[PATCH] c++: Disable -Wint-in-bool-context in instantiations

2021-05-12 Thread Marek Polacek via Gcc-patches
This warning is of questionable value when it's emitted when instantiating a template, as in the following testcase. It could be silenced by writing hb(i) << 1 instead of 2 * hb(i) but that's unnecessary obfuscation. Bootstrapped/regtested on x86_64-pc-linux-gnu, ok for trunk? gcc/cp/ChangeLog: