]> git.ipfire.org Git - thirdparty/gcc.git/commit - libcpp/ChangeLog
re PR c++/50810 (c++0x-compat does not warn about narrowing conversions)
authorJason Merrill <jason@gcc.gnu.org>
Wed, 2 Nov 2011 20:16:43 +0000 (16:16 -0400)
committerJason Merrill <jason@gcc.gnu.org>
Wed, 2 Nov 2011 20:16:43 +0000 (16:16 -0400)
commit25339f1097a119662a4989964f32143ad44edbd3
tree883396e26db08ff838de9608ab092c69fcce8870
parent24748eb48e44ae268686a795149edc03af0e4310
re PR c++/50810 (c++0x-compat does not warn about narrowing conversions)

PR c++/50810
gcc/c-family
* c-opts.c (c_common_handle_option): Enable -Wnarrowing as part
of -Wall; include -Wnarrowing in -Wc++0x-compat; adjust default
Wnarrowing for C++0x and C++98.
* c.opt ([Wnarrowing]): Update.
gcc/cp
* typeck2.c (check_narrowing): Adjust OPT_Wnarrowing diagnostics.
(digest_init_r): Call check_narrowing irrespective of the C++ dialect.
* decl.c (check_initializer): Likewise.
* semantics.c (finish_compound_literal): Likewise.
gcc/
* configure.ac: Add -Wno-narrowing to warning options.
libcpp/
* configure.ac: Add -Wno-narrowing to warning options.

From-SVN: r180794
17 files changed:
gcc/ChangeLog
gcc/c-family/ChangeLog
gcc/c-family/c-opts.c
gcc/c-family/c.opt
gcc/configure
gcc/configure.ac
gcc/cp/ChangeLog
gcc/cp/decl.c
gcc/cp/semantics.c
gcc/cp/typeck2.c
gcc/doc/invoke.texi
gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/cpp0x/warn_cxx0x2.C [new file with mode: 0644]
gcc/testsuite/g++.dg/cpp0x/warn_cxx0x3.C [new file with mode: 0644]
libcpp/ChangeLog
libcpp/configure
libcpp/configure.ac