Re: C++ PATCH for c++/65043, missing narrowing warning with bool

2018-08-21 Thread Jason Merrill
On Wed, Aug 15, 2018 at 11:30 AM, Marek Polacek wrote: > We weren't complaining about narrowing when converting to bool because > standard_conversion wasn't setting check_narrowing for the converting to bool > case; it only sets it at the end of the function. Moreover, check_narrowing > wasn't ca

C++ PATCH for c++/65043, missing narrowing warning with bool

2018-08-14 Thread Marek Polacek
We weren't complaining about narrowing when converting to bool because standard_conversion wasn't setting check_narrowing for the converting to bool case; it only sets it at the end of the function. Moreover, check_narrowing wasn't catching real_type -> boolean_type at all, which is wrong; [dcl.in