aboutsummaryrefslogtreecommitdiff
path: root/gcc/doc
diff options
context:
space:
mode:
authorManuel López-Ibáñez <manu@gcc.gnu.org>2010-02-20 21:32:06 +0000
committerManuel López-Ibáñez <manu@gcc.gnu.org>2010-02-20 21:32:06 +0000
commit17251338deebd6575ef2a9e2c99c3f976561dc93 (patch)
tree80eb6bcb9ce16ee2cd887d93ee782806145b1486 /gcc/doc
parentc387e0676eb6949dfc49681d6ac1b09c3e11d2ca (diff)
downloadgcc-17251338deebd6575ef2a9e2c99c3f976561dc93.zip
gcc-17251338deebd6575ef2a9e2c99c3f976561dc93.tar.gz
gcc-17251338deebd6575ef2a9e2c99c3f976561dc93.tar.bz2
re PR c++/35669 (NULL (__null) not considered different from 0 with C++)
2010-02-20 Manuel López-Ibáñez <manu@gcc.gnu.org> PR c++/35669 * c.opt (Wconversion-null): New option. * doc/invoke.texi (Wconversion-null): Document. cp/ * call.c (conversion_null_warnings): Replace -Wconversion with -Wconversion-null. * cvt.c (build_expr_type_conversion): Likewise. testsuite/ * g++.dg/warn/Wconversion2.C: Replace -Wconversion with -Wconversion-null. * g++.dg/warn/Wconversion-null.C: New test. * g++.old-deja/g++.other/null1.C: Move to... * g++.dg/warn/Wconversion-null-2.C: ... here. Remove -Wconversion. libstdc++-v3/ * testsuite/18_support/headers/cstddef/macros.cc: Add -Wno-conversion-null. From-SVN: r156928
Diffstat (limited to 'gcc/doc')
-rw-r--r--gcc/doc/invoke.texi19
1 files changed, 12 insertions, 7 deletions
diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi
index a81cc99..a7abd01 100644
--- a/gcc/doc/invoke.texi
+++ b/gcc/doc/invoke.texi
@@ -194,7 +194,7 @@ in the following sections.
-fno-threadsafe-statics -fuse-cxa-atexit -fno-weak -nostdinc++ @gol
-fno-default-inline -fvisibility-inlines-hidden @gol
-fvisibility-ms-compat @gol
--Wabi -Wctor-dtor-privacy @gol
+-Wabi -Wconversion-null -Wctor-dtor-privacy @gol
-Wnon-virtual-dtor -Wreorder @gol
-Weffc++ -Wstrict-null-sentinel @gol
-Wno-non-template-friend -Wold-style-cast @gol
@@ -3837,14 +3837,19 @@ changed by the conversion like in @code{abs (2.0)}. Warnings about
conversions between signed and unsigned integers can be disabled by
using @option{-Wno-sign-conversion}.
-For C++, also warn for conversions between @code{NULL} and non-pointer
-types; confusing overload resolution for user-defined conversions; and
-conversions that will never use a type conversion operator:
-conversions to @code{void}, the same type, a base class or a reference
-to them. Warnings about conversions between signed and unsigned
-integers are disabled by default in C++ unless
+For C++, also warn for confusing overload resolution for user-defined
+conversions; and conversions that will never use a type conversion
+operator: conversions to @code{void}, the same type, a base class or a
+reference to them. Warnings about conversions between signed and
+unsigned integers are disabled by default in C++ unless
@option{-Wsign-conversion} is explicitly enabled.
+@item -Wno-conversion-null @r{(C++)}
+@opindex Wconversion-null
+@opindex Wno-conversion-null
+Do not warn for conversions between @code{NULL} and non-pointer
+types. @option{-Wconversion-null} is enabled by default.
+
@item -Wempty-body
@opindex Wempty-body
@opindex Wno-empty-body