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++/71985] narrowing in initializer lists is not ill-formed where required


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

--- Comment #6 from Manuel López-Ibáñez <manu at gcc dot gnu.org> ---
Note also that we give two warnings:

prog.cc:7:15: error: narrowing conversion of '0.0' from 'double' to 'int'
inside { } [-Wnarrowing]
 B b2 { 1, 0.0 };
               ^
prog.cc:9:25: warning: narrowing conversion of 'd' from 'double' to 'int'
inside { } [-Wnarrowing]
 std::vector<int> v1 { d };
                         ^
prog.cc:9:25: warning: narrowing conversion of 'd' from 'double' to 'int'
inside { } [-Wnarrowing]

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