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


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

--- Comment #6 from paolo at gcc dot gnu.org <paolo at gcc dot gnu.org> ---
Author: paolo
Date: Fri Jul 11 21:53:59 2014
New Revision: 212469

URL: https://gcc.gnu.org/viewcvs?rev=212469&root=gcc&view=rev
Log:
/cp
2014-07-11  Paolo Carlini  <paolo.carlini@oracle.com>

    PR c++/53159
    * call.c (build_user_type_conversion_1): Copy LOOKUP_NO_NARROWING
    into convflags.
    * decl.c (check_initializer): Don't call check_narrowing here,
    set LOOKUP_NO_NARROWING.
    * typeck2.c (digest_init_r): Likewise.

/testsuite
2014-07-11  Paolo Carlini  <paolo.carlini@oracle.com>

    PR c++/53159
    * g++.dg/cpp0x/Wnarrowing1.C: New.

Added:
    trunk/gcc/testsuite/g++.dg/cpp0x/Wnarrowing1.C
Modified:
    trunk/gcc/cp/ChangeLog
    trunk/gcc/cp/call.c
    trunk/gcc/cp/decl.c
    trunk/gcc/cp/typeck2.c
    trunk/gcc/testsuite/ChangeLog


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