From 25339f1097a119662a4989964f32143ad44edbd3 Mon Sep 17 00:00:00 2001 From: Jason Merrill Date: Wed, 2 Nov 2011 16:16:43 -0400 Subject: 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 --- libcpp/configure.ac | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'libcpp/configure.ac') diff --git a/libcpp/configure.ac b/libcpp/configure.ac index e1d8851..e843768 100644 --- a/libcpp/configure.ac +++ b/libcpp/configure.ac @@ -33,7 +33,7 @@ AC_CHECK_PROGS([AUTOHEADER], [autoheader], [$MISSING autoheader]) # Figure out what compiler warnings we can enable. # See config/warnings.m4 for details. -ACX_PROG_CC_WARNING_OPTS([-W -Wall -Wwrite-strings \ +ACX_PROG_CC_WARNING_OPTS([-W -Wall -Wno-narrowing -Wwrite-strings \ -Wmissing-format-attribute], [warn]) ACX_PROG_CC_WARNING_OPTS([-Wstrict-prototypes -Wmissing-prototypes \ -Wold-style-definition -Wc++-compat], [c_warn]) -- cgit v1.1