diff options
author | James E Wilson <wilson@specifixinc.com> | 2004-03-10 06:02:55 +0000 |
---|---|---|
committer | Jim Wilson <wilson@gcc.gnu.org> | 2004-03-09 22:02:55 -0800 |
commit | 5399d643680b153db318cd9ef38787774eac34c4 (patch) | |
tree | 893bd1037263eb2e8912cc841d795b6695e442e7 /gcc/doc/invoke.texi | |
parent | a4e9467d735cfdbcbe64902f9a3dd30c440c71fb (diff) | |
download | gcc-5399d643680b153db318cd9ef38787774eac34c4.zip gcc-5399d643680b153db318cd9ef38787774eac34c4.tar.gz gcc-5399d643680b153db318cd9ef38787774eac34c4.tar.bz2 |
New option -Wstrict-aliasing=2.
* alias.c (alias_sets_might_conflict_p): New.
* c-typeck.c (build_c_cast): Call it if warn_strict_aliasing > 1.
* common.opt (Wstrict-aliasing=): New.
* flags.h (warn_strict_aliasing): Change type to int.
* opts.c (warn_strict_aliasing): Change type to int.
(common_handle_option): Handle OPT_Wstrict_aliasing_.
* tree.h (alias_sets_might_conflict_p): Declare it.
* doc/invoke.tex (-Wstrict-aliasing=2): Document it.
From-SVN: r79222
Diffstat (limited to 'gcc/doc/invoke.texi')
-rw-r--r-- | gcc/doc/invoke.texi | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi index 8caed2b..0c9f183 100644 --- a/gcc/doc/invoke.texi +++ b/gcc/doc/invoke.texi @@ -226,7 +226,7 @@ in the following sections. -Wno-multichar -Wnonnull -Wpacked -Wpadded @gol -Wparentheses -Wpointer-arith -Wredundant-decls @gol -Wreturn-type -Wsequence-point -Wshadow @gol --Wsign-compare -Wstrict-aliasing @gol +-Wsign-compare -Wstrict-aliasing -Wstrict-aliasing=2 @gol -Wswitch -Wswitch-default -Wswitch-enum @gol -Wsystem-headers -Wtrigraphs -Wundef -Wuninitialized @gol -Wunknown-pragmas -Wunreachable-code @gol @@ -2449,6 +2449,13 @@ compiler is using for optimization. The warning does not catch all cases, but does attempt to catch the more common pitfalls. It is included in @option{-Wall}. +@item -Wstrict-aliasing=2 +@opindex Wstrict-aliasing=2 +This option is only active when @option{-fstrict-aliasing} is active. +It warns about all code which might break the strict aliasing rules that the +compiler is using for optimization. This warning catches all cases, but +it will also give a warning for some ambiguous cases that are safe. + @item -Wall @opindex Wall All of the above @samp{-W} options combined. This enables all the |