aboutsummaryrefslogtreecommitdiff
path: root/gcc/doc/invoke.texi
diff options
context:
space:
mode:
authorPaolo Carlini <paolo.carlini@oracle.com>2011-10-23 20:59:43 +0000
committerPaolo Carlini <paolo@gcc.gnu.org>2011-10-23 20:59:43 +0000
commit5f53c2438d7ab612645c5355a344e7fbf483bdf3 (patch)
tree6419cf048cf3419e6cced14babbb3920789c4edf /gcc/doc/invoke.texi
parentbe98aaf0bccea7960914007a08ca822713f5c60d (diff)
downloadgcc-5f53c2438d7ab612645c5355a344e7fbf483bdf3.zip
gcc-5f53c2438d7ab612645c5355a344e7fbf483bdf3.tar.gz
gcc-5f53c2438d7ab612645c5355a344e7fbf483bdf3.tar.bz2
re PR c++/50841 (bootstrap failure: narrowing conversion of '-0x00000000000000001' from 'int' in tree-object-size.c)
/c-family 2011-10-23 Paolo Carlini <paolo.carlini@oracle.com> PR c++/50841 Revert: 2011-10-23 Paolo Carlini <paolo.carlini@oracle.com> PR c++/50810 * 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. /cp 2011-10-23 Paolo Carlini <paolo.carlini@oracle.com> PR c++/50841 Revert: 2011-10-23 Paolo Carlini <paolo.carlini@oracle.com> PR c++/50810 * 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. /testsuite 2011-10-23 Paolo Carlini <paolo.carlini@oracle.com> PR c++/50841 Revert: 2011-10-23 Paolo Carlini <paolo.carlini@oracle.com> PR c++/50810 * g++.dg/cpp0x/warn_cxx0x2.C: New. * g++.dg/cpp0x/warn_cxx0x3.C: Likewise. 2011-10-23 Paolo Carlini <paolo.carlini@oracle.com> PR c++/50841 Revert: 2011-10-23 Paolo Carlini <paolo.carlini@oracle.com> PR c++/50810 * doc/invoke.texi ([-Wnarrowing], [-Wc++0x-compat]): Update. From-SVN: r180348
Diffstat (limited to 'gcc/doc/invoke.texi')
-rw-r--r--gcc/doc/invoke.texi12
1 files changed, 5 insertions, 7 deletions
diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi
index 42f0651..9791a8f 100644
--- a/gcc/doc/invoke.texi
+++ b/gcc/doc/invoke.texi
@@ -2365,18 +2365,17 @@ an instance of a derived class through a pointer to a base class if the
base class does not have a virtual destructor. This warning is enabled
by @option{-Wall}.
-@item -Wnarrowing @r{(C++ and Objective-C++ only)}
+@item -Wno-narrowing @r{(C++ and Objective-C++ only)}
@opindex Wnarrowing
@opindex Wno-narrowing
-Warn when a narrowing conversion occurs within @samp{@{ @}}, e.g.
+With -std=c++0x, suppress the diagnostic required by the standard for
+narrowing conversions within @samp{@{ @}}, e.g.
@smallexample
int i = @{ 2.2 @}; // error: narrowing from double to int
@end smallexample
-This flag is included in @option{-Wall} and @option{-Wc++0x-compat}.
-With -std=c++0x, @option{-Wno-narrowing} suppresses the diagnostic
-required by the standard.
+This flag can be useful for compiling valid C++98 code in C++0x mode
@item -Wnoexcept @r{(C++ and Objective-C++ only)}
@opindex Wnoexcept
@@ -4067,8 +4066,7 @@ ISO C and ISO C++, e.g.@: request for implicit conversion from
@item -Wc++0x-compat @r{(C++ and Objective-C++ only)}
Warn about C++ constructs whose meaning differs between ISO C++ 1998 and
ISO C++ 200x, e.g., identifiers in ISO C++ 1998 that will become keywords
-in ISO C++ 200x. This warning turns on @option{-Wnarrowing} and is
-enabled by @option{-Wall}.
+in ISO C++ 200x. This warning is enabled by @option{-Wall}.
@item -Wcast-qual
@opindex Wcast-qual