aboutsummaryrefslogtreecommitdiff
path: root/gcc/doc
diff options
context:
space:
mode:
authorGabriel Dos Reis <gdr@integrable-solutions.net>2005-06-09 22:21:48 +0000
committerGabriel Dos Reis <gdr@gcc.gnu.org>2005-06-09 22:21:48 +0000
commitb7e20b53f60d973debcd771c882cc44b13db38b1 (patch)
tree5ba1ed694692d32697b04063c0e9fb9c31bfdbd2 /gcc/doc
parent92f5e87c2ba9b5f83b8b465a43e43d41a2801265 (diff)
downloadgcc-b7e20b53f60d973debcd771c882cc44b13db38b1.zip
gcc-b7e20b53f60d973debcd771c882cc44b13db38b1.tar.gz
gcc-b7e20b53f60d973debcd771c882cc44b13db38b1.tar.bz2
re PR c/21759 (Implement warning for codes at the intersection of C and C++)
PR c/21759 * c.opt (Wc++-compat): New. * doc/invoke.texi (-Wc++-compat): Document. * c-typeck.c (convert_for_assignment): Check for implicit conversion void* -> T*. testsuite/ * gcc.dg/Wcxx-compat-1.c: New. From-SVN: r100806
Diffstat (limited to 'gcc/doc')
-rw-r--r--gcc/doc/invoke.texi7
1 files changed, 6 insertions, 1 deletions
diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi
index eef9a0f..95846f1 100644
--- a/gcc/doc/invoke.texi
+++ b/gcc/doc/invoke.texi
@@ -219,7 +219,7 @@ Objective-C and Objective-C++ Dialects}.
@xref{Warning Options,,Options to Request or Suppress Warnings}.
@gccoptlist{-fsyntax-only -pedantic -pedantic-errors @gol
-w -Wextra -Wall -Waggregate-return -Wno-attributes @gol
--Wcast-align -Wcast-qual -Wchar-subscripts -Wcomment @gol
+-Wc++-compat -Wcast-align -Wcast-qual -Wchar-subscripts -Wcomment @gol
-Wconversion -Wno-deprecated-declarations @gol
-Wdisabled-optimization -Wno-div-by-zero -Wno-endif-labels @gol
-Werror -Werror-implicit-function-declaration @gol
@@ -2993,6 +2993,11 @@ to functions.
Warn whenever a function call is cast to a non-matching type.
For example, warn if @code{int malloc()} is cast to @code{anything *}.
+@item -Wc++-compat
+Warn about ISO C constructs that are outside of the common subset of
+ISO C and ISO C++, e.g.@: request for implicit conversion from
+@code{void *} to a pointer to non-@code{void} type.
+
@item -Wcast-qual
@opindex Wcast-qual
Warn whenever a pointer is cast so as to remove a type qualifier from