Commit 802e3f8c by Ralf Wildenhues Committed by Ralf Wildenhues

c.opt (Wsynth): Deprecate.

gcc/

	* c.opt (Wsynth): Deprecate.
	* doc/invoke.texi (Option Summary, Warning Options): Document
	-Wno-format-contains-nul.

gcc/fortran/

	* invoke.texi (Error and Warning Options): Document
	-Wline-truncation.

contrib/

	* check_warning_flags.sh: Instead of invoke.texi, take the path
	to the doc directory as argument.  Check that warnings listed in
	'gcc --help' are accepted by the compiler, and listed in the
	manuals.

From-SVN: r133059
parent fa37b948
2008-03-09 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
* check_warning_flags.sh: Instead of invoke.texi, take the path
to the doc directory as argument. Check that warnings listed in
'gcc --help' are accepted by the compiler, and listed in the
manuals.
2008-03-06 Tom Tromey <tromey@redhat.com> 2008-03-06 Tom Tromey <tromey@redhat.com>
* patch_tester.sh (usage): Watermark is not lexicographic. * patch_tester.sh (usage): Watermark is not lexicographic.
......
...@@ -18,7 +18,7 @@ ...@@ -18,7 +18,7 @@
progname=`echo "$0" | sed 's,.*/,,'` progname=`echo "$0" | sed 's,.*/,,'`
usage () usage ()
{ {
echo "usage: $progname path/to/invoke.texi" echo "usage: $progname path/to/gcc/doc"
echo "set \$CC to the compiler to be checked" echo "set \$CC to the compiler to be checked"
exit 1 exit 1
} }
...@@ -28,7 +28,8 @@ LC_ALL=C ...@@ -28,7 +28,8 @@ LC_ALL=C
export LC_ALL export LC_ALL
: ${CC=gcc} : ${CC=gcc}
test $# = 1 || usage test $# = 1 || usage
invoke_texi=$1 gcc_docdir=$1
invoke_texi=$gcc_docdir/invoke.texi
test -r "$invoke_texi" || { test -r "$invoke_texi" || {
echo "$progname: error: cannot read '$invoke_texi'" >&2 echo "$progname: error: cannot read '$invoke_texi'" >&2
usage usage
...@@ -133,4 +134,44 @@ for lang in c c++ objc obj-c++; do ...@@ -133,4 +134,44 @@ for lang in c c++ objc obj-c++; do
} }
rm -f $file $filebase.o $filebase.obj $stderr rm -f $file $filebase.o $filebase.obj $stderr
done done
remove_problematic_help_flags='
/^W$/d
/^W[alp]$/d
/^Werror-implicit-function-declaration$/d
/^Wsynth$/d
/-$/d
/=/d'
help_flags=`
$CC --help -v 2>/dev/null | tr ' ' '\n' |
sed -n '
b a
:a
s/^-\(W[^<,]*\).*/\1/
t x
d
:x
'"$remove_problematic_help_flags"'
p' | sort -u`
: >$filebase.c
for flag in $help_flags; do
$CC -c $filebase.c -$flag 2>/dev/null || {
echo "warning -$flag not supported" >&2
ret=1
}
grep "@item.*$flag" $gcc_docdir/../*/*.texi >/dev/null || {
# For @item, we are satisfied with either -Wfoo or -Wno-foo.
inverted_flag=`echo "$flag" | sed '
s/^Wno-/W/
t
s/^W/Wno-/'`
grep "@item.*$inverted_flag" $gcc_docdir/../*/*.texi >/dev/null || {
echo "warning -$flag not documented in $gcc_docdir/../*/*.texi" >&2
ret=1
}
}
done
rm -f $filebase.c $filebase.o
exit $ret exit $ret
2008-03-09 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
* c.opt (Wsynth): Deprecate.
* doc/invoke.texi (Option Summary, Warning Options): Document
-Wno-format-contains-nul.
2008-03-09 Uros Bizjak <ubizjak@gmail.com> 2008-03-09 Uros Bizjak <ubizjak@gmail.com>
PR target/35496 PR target/35496
......
...@@ -423,7 +423,7 @@ Warn if type signatures of candidate methods do not match exactly ...@@ -423,7 +423,7 @@ Warn if type signatures of candidate methods do not match exactly
Wsynth Wsynth
C++ ObjC++ Var(warn_synth) Warning C++ ObjC++ Var(warn_synth) Warning
Warn when synthesis behavior differs from Cfront Deprecated. This switch has no effect
Wsystem-headers Wsystem-headers
C ObjC C++ ObjC++ Warning C ObjC C++ ObjC++ Warning
......
...@@ -235,7 +235,7 @@ Objective-C and Objective-C++ Dialects}. ...@@ -235,7 +235,7 @@ Objective-C and Objective-C++ Dialects}.
-Wempty-body -Wno-endif-labels @gol -Wempty-body -Wno-endif-labels @gol
-Werror -Werror=* @gol -Werror -Werror=* @gol
-Wfatal-errors -Wfloat-equal -Wformat -Wformat=2 @gol -Wfatal-errors -Wfloat-equal -Wformat -Wformat=2 @gol
-Wno-format-extra-args -Wformat-nonliteral @gol -Wno-format-contains-nul -Wno-format-extra-args -Wformat-nonliteral @gol
-Wformat-security -Wformat-y2k @gol -Wformat-security -Wformat-y2k @gol
-Wframe-larger-than=@var{len} -Wignored-qualifiers @gol -Wframe-larger-than=@var{len} -Wignored-qualifiers @gol
-Wimplicit -Wimplicit-function-declaration -Wimplicit-int @gol -Wimplicit -Wimplicit-function-declaration -Wimplicit-int @gol
...@@ -2811,6 +2811,12 @@ aspects of format checking, the options @option{-Wformat-y2k}, ...@@ -2811,6 +2811,12 @@ aspects of format checking, the options @option{-Wformat-y2k},
If @option{-Wformat} is specified, also warn about @code{strftime} If @option{-Wformat} is specified, also warn about @code{strftime}
formats which may yield only a two-digit year. formats which may yield only a two-digit year.
@item -Wno-format-contains-nul
@opindex Wno-format-contains-nul
@opindex Wformat-contains-nul
If @option{-Wformat} is specified, do not warn about format strings that
contain NUL bytes.
@item -Wno-format-extra-args @item -Wno-format-extra-args
@opindex Wno-format-extra-args @opindex Wno-format-extra-args
@opindex Wformat-extra-args @opindex Wformat-extra-args
......
2008-03-09 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
* invoke.texi (Error and Warning Options): Document
-Wline-truncation.
2008-03-08 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org> 2008-03-08 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
PR fortran/34956 PR fortran/34956
......
...@@ -456,6 +456,11 @@ that initiated the continuation. ...@@ -456,6 +456,11 @@ that initiated the continuation.
@cindex warnings, character truncation @cindex warnings, character truncation
Warn when a character assignment will truncate the assigned string. Warn when a character assignment will truncate the assigned string.
@item -Wline-truncation
@opindex @code{Wline-truncation}
@cindex warnings, line truncation
Warn when a source code line will be truncated.
@item -Wconversion @item -Wconversion
@opindex @code{Wconversion} @opindex @code{Wconversion}
@cindex warnings, conversion @cindex warnings, conversion
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment