This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c++/53159] Missing narrowing check


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53159

--- Comment #2 from Paolo Carlini <paolo.carlini at oracle dot com> 2012-05-21 19:26:32 UTC ---
Essentially the problem is that check_narrowing doesn't know how to handle type
conversion operators or anything more sophisticated than just scalars as init
and gives up. The issue should be therefore fixable relatively easily by way of
perform_implicit_conversion of perform_implicit_conversion_flag but one must be
careful with designated initializers, scalars which can't be initialized with a
brace-enclosed initializer in C++98, special cases, otherwise reshape_init
doesn't do much in case of SCALAR_TYPE_P (type).


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]