aboutsummaryrefslogtreecommitdiff
path: root/gcc/doc
diff options
context:
space:
mode:
authorBernd Edlinger <bernd.edlinger@hotmail.de>2017-09-15 17:21:50 +0000
committerBernd Edlinger <edlinger@gcc.gnu.org>2017-09-15 17:21:50 +0000
commit1d9335766d86262f8335d63d99b328bb44543b01 (patch)
tree5e9491b32fa26d79e07318fdf780451f77607b38 /gcc/doc
parent4a8ca690b0b73f4e0bae542fd69a1ee0d9e73126 (diff)
downloadgcc-1d9335766d86262f8335d63d99b328bb44543b01.zip
gcc-1d9335766d86262f8335d63d99b328bb44543b01.tar.gz
gcc-1d9335766d86262f8335d63d99b328bb44543b01.tar.bz2
common.opt (Wcast-align=strict): New warning option.
2017-09-15 Bernd Edlinger <bernd.edlinger@hotmail.de> * common.opt (Wcast-align=strict): New warning option. * doc/invoke.texi: Document -Wcast-align=strict. c: 2017-09-15 Bernd Edlinger <bernd.edlinger@hotmail.de> * c-typeck.c (build_c_cast): Implement -Wcast-align=strict. cp: 2017-09-15 Bernd Edlinger <bernd.edlinger@hotmail.de> * typeck.c (build_reinterpret_cast_1, build_const_cast_1): Implement -Wcast-align=strict. testsuite: 2017-09-15 Bernd Edlinger <bernd.edlinger@hotmail.de> * c-c++-common/Wcast-align.c: New test. From-SVN: r252832
Diffstat (limited to 'gcc/doc')
-rw-r--r--gcc/doc/invoke.texi9
1 files changed, 8 insertions, 1 deletions
diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi
index a727d95..60650c8 100644
--- a/gcc/doc/invoke.texi
+++ b/gcc/doc/invoke.texi
@@ -266,7 +266,8 @@ Objective-C and Objective-C++ Dialects}.
-Wno-attributes -Wbool-compare -Wbool-operation @gol
-Wno-builtin-declaration-mismatch @gol
-Wno-builtin-macro-redefined -Wc90-c99-compat -Wc99-c11-compat @gol
--Wc++-compat -Wc++11-compat -Wc++14-compat -Wcast-align -Wcast-qual @gol
+-Wc++-compat -Wc++11-compat -Wc++14-compat @gol
+-Wcast-align -Wcast-align=strict -Wcast-qual @gol
-Wchar-subscripts -Wchkp -Wcatch-value -Wcatch-value=@var{n} @gol
-Wclobbered -Wcomment -Wconditionally-supported @gol
-Wconversion -Wcoverage-mismatch -Wno-cpp -Wdangling-else -Wdate-time @gol
@@ -5931,6 +5932,12 @@ target is increased. For example, warn if a @code{char *} is cast to
an @code{int *} on machines where integers can only be accessed at
two- or four-byte boundaries.
+@item -Wcast-align=strict
+@opindex Wcast-align=strict
+Warn whenever a pointer is cast such that the required alignment of the
+target is increased. For example, warn if a @code{char *} is cast to
+an @code{int *} regardless of the target machine.
+
@item -Wwrite-strings
@opindex Wwrite-strings
@opindex Wno-write-strings