aboutsummaryrefslogtreecommitdiff
path: root/gcc/doc
diff options
context:
space:
mode:
authorManuel López-Ibáñez <manu@gcc.gnu.org>2007-01-30 22:29:11 +0000
committerManuel López-Ibáñez <manu@gcc.gnu.org>2007-01-30 22:29:11 +0000
commitb9edb4b11c99720e10625b41d37dc440bd468f2c (patch)
tree6ab5f599b4f4444b77112bd54a7ebdc103ca2f51 /gcc/doc
parent14734fc701357c82967954578c822f3ddede043f (diff)
downloadgcc-b9edb4b11c99720e10625b41d37dc440bd468f2c.zip
gcc-b9edb4b11c99720e10625b41d37dc440bd468f2c.tar.gz
gcc-b9edb4b11c99720e10625b41d37dc440bd468f2c.tar.bz2
re PR c++/24745 (unpleasant warning for "if (NULL)")
2007-01-30 Manuel Lopez-Ibanez <manu@gcc.gnu.org> PR c++/24745 * doc/invoke.texi (Wpointer-arith): Document warning. cp/ * typeck.c (build_binary_op): Fix logic for warning. Move warning to -Wpointer-arith. * call.c (convert_like_real): Don't warn when converting to boolean type. testsuite/ * g++.dg/warn/null4.C: New. From-SVN: r121361
Diffstat (limited to 'gcc/doc')
-rw-r--r--gcc/doc/invoke.texi3
1 files changed, 2 insertions, 1 deletions
diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi
index bd4bca6..31490b8 100644
--- a/gcc/doc/invoke.texi
+++ b/gcc/doc/invoke.texi
@@ -3153,7 +3153,8 @@ such assumptions.
Warn about anything that depends on the ``size of'' a function type or
of @code{void}. GNU C assigns these types a size of 1, for
convenience in calculations with @code{void *} pointers and pointers
-to functions.
+to functions. In C++, warn also when an arithmetic operation involves
+@code{NULL}. This warning is also enabled by @option{-pedantic}.
@item -Wbad-function-cast @r{(C only)}
@opindex Wbad-function-cast