diff options
author | jason <jason@138bc75d-0d04-0410-961f-82ee72b054a4> | 2011-11-02 20:16:43 +0000 |
---|---|---|
committer | jason <jason@138bc75d-0d04-0410-961f-82ee72b054a4> | 2011-11-02 20:16:43 +0000 |
commit | 7e783eb31289e9c506e33c1f9286387c0ff08425 (patch) | |
tree | 883396e26db08ff838de9608ab092c69fcce8870 /libcpp | |
parent | 86f32fa5f39d6c133b3ba59a35de648906c80971 (diff) | |
download | gcc-7e783eb31289e9c506e33c1f9286387c0ff08425.tar.gz |
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.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@180794 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libcpp')
-rw-r--r-- | libcpp/ChangeLog | 5 | ||||
-rwxr-xr-x | libcpp/configure | 2 | ||||
-rw-r--r-- | libcpp/configure.ac | 2 |
3 files changed, 7 insertions, 2 deletions
diff --git a/libcpp/ChangeLog b/libcpp/ChangeLog index 64ed4683669..3fecead3f5b 100644 --- a/libcpp/ChangeLog +++ b/libcpp/ChangeLog @@ -1,3 +1,8 @@ +2011-11-02 Jason Merrill <jason@redhat.com> + + PR c++/50810 + * configure.ac: Add -Wno-narrowing to warning options. + 2011-10-31 Jason Merrill <jason@redhat.com> PR libstdc++/1773 diff --git a/libcpp/configure b/libcpp/configure index c400d23a93d..a26a4775bf9 100755 --- a/libcpp/configure +++ b/libcpp/configure @@ -4687,7 +4687,7 @@ test -n "$AUTOHEADER" || AUTOHEADER="$MISSING autoheader" warn= save_CFLAGS="$CFLAGS" -for option in -W -Wall -Wwrite-strings \ +for option in -W -Wall -Wno-narrowing -Wwrite-strings \ -Wmissing-format-attribute; do as_acx_Woption=`$as_echo "acx_cv_prog_cc_warning_$option" | $as_tr_sh` diff --git a/libcpp/configure.ac b/libcpp/configure.ac index e1d88511c78..e8437680ffa 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]) |