Hi,
On 05/22/2012 12:53 AM, Jason Merrill wrote:
On 05/21/2012 04:18 PM, Paolo Carlini wrote:
-check_narrowing (type, init);
+check_narrowing (type, perform_implicit_conversion
+ (type, tinit, tf_none));
Any changes should go inside check_narrowing rather than
On 05/22/2012 12:52 PM, Paolo Carlini wrote:
Let's see if I understand in detail the structure of the new function
(beyond all the simplifications possible because the target is a scalar,
etc): we want something quite similar to implicit_conversion, but at the
end of it, instead of using
On 05/22/2012 07:02 PM, Jason Merrill wrote:
On 05/22/2012 12:52 PM, Paolo Carlini wrote:
Let's see if I understand in detail the structure of the new function
(beyond all the simplifications possible because the target is a scalar,
etc): we want something quite similar to implicit_conversion,
Hi,
this PR is about the missing -Wnarrowing warning for:
struct X
{
constexpr operator int() { return __INT_MAX__; }
};
signed char c { X{} };
The core issue seems pretty simple: check_narrowing, called by
check_initializer, cannot handle something as complex as a class type
with a type
On 05/22/2012 12:53 AM, Jason Merrill wrote:
On 05/21/2012 04:18 PM, Paolo Carlini wrote:
-check_narrowing (type, init);
+check_narrowing (type, perform_implicit_conversion
+ (type, tinit, tf_none));
Any changes should go inside check_narrowing rather than